Project

Profile

Help

Revision 40ff0cc0

ID40ff0cc0caa60a89cbd5ba2ba2c652a8e5a4caba
Parent 1a05062b
Child 80361b92

Added by Vincent Le Goff 2 months ago

Fix #151: the #repeat function can't be used to repeat the last command X times

View differences:

src/sharp/functions/repeat.py
55 55
            return
56 56

  
57 57
        client = self.client
58
        panel = client.window
59
        if command is None:
60
            for last in reversed(panel.extensions["history"].commands):
58
        panel = client.factory.panel
59
        if not command:
60
            for last in reversed(panel.extensions["history"].commands[:-1]):
61 61
                if not last.startswith("#") or last.startswith("##"):
62 62
                    command = last
63
                    break
64 63

  
65 64
        times = int(times)
66 65
        if command:

Also available in: Unified diff