]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - lib/readline/undo.c
bash-5.1 distribution sources and documentation
[thirdparty/bash.git] / lib / readline / undo.c
index ae65d38043a7acff72e94785aa669401696260dd..147999119a6123532e8d932f2ccb1783e4c1a7a7 100644 (file)
@@ -196,6 +196,7 @@ rl_do_undo (void)
        /* Undoing deletes means inserting some text. */
        case UNDO_DELETE:
          rl_point = start;
+         _rl_fix_point (1);
          rl_insert_text (rl_undo_list->text);
          xfree (rl_undo_list->text);
          break;
@@ -204,6 +205,7 @@ rl_do_undo (void)
        case UNDO_INSERT:
          rl_delete_text (start, end);
          rl_point = start;
+         _rl_fix_point (1);
          break;
 
        /* Undoing an END means undoing everything 'til we get to a BEGIN. */