diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-03-25 22:05:45 +0100 | 
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-03-25 22:05:45 +0100 | 
| commit | c4dbe74a100ab355da80953c8c1288889bd41757 (patch) | |
| tree | 64b1f4f4e42dbea641717cbed2fe77c82c1e8945 /src/interface-curses/curses-utils.h | |
| parent | 39124fd2ad6a3e0bf51d4b7c91fafef6108eacd5 (diff) | |
fixed rubout and reinsertion of the loop end command (>)
 * the loop counter wasn't properly restored when rubbing out
   the loop end command, so when it was reinserted again,
   it would still be 1 (since that's the abortion criteria) and
   no additional loop iteration was performed.
 * simple test case: Try typing 5<%a> then rubout and reinsert ">".
 * Fixed by saving the loop counter before modifying it.
   There are arguably more efficient ways to do this like only
   creating one undo token at the end of the loop -- but that
   would require storing the initial loop counter in the LoopContext
   and would generally be more tricky.
 * The case of infinite loops has been optimized in interactive mode:
   Since the loop counter never actually changes, we do not have
   to create an undo token per loop iteration.
Diffstat (limited to 'src/interface-curses/curses-utils.h')
0 files changed, 0 insertions, 0 deletions
