diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-08-25 10:20:38 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-08-27 22:13:45 +0200 |
commit | 5b41070c639f979023178042bea8e5fcc8a898fe (patch) | |
tree | c7e3c39c63e325950b8b123ed567e38898f406a1 /src/nvim/tui/input.c | |
parent | bfc5a18f4b6cb4bc2335440254c346d731063b46 (diff) | |
download | rneovim-5b41070c639f979023178042bea8e5fcc8a898fe.tar.gz rneovim-5b41070c639f979023178042bea8e5fcc8a898fe.tar.bz2 rneovim-5b41070c639f979023178042bea8e5fcc8a898fe.zip |
paste: implement redo (AKA dot-repeat)
- Normal-mode redo idiom(?): prepend "i" and append ESC.
- Insert-mode only needs AppendToRedobuffLit().
- Cmdline-mode: only paste the first line.
Diffstat (limited to 'src/nvim/tui/input.c')
-rw-r--r-- | src/nvim/tui/input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c index 33062e88d3..f9f39c36ff 100644 --- a/src/nvim/tui/input.c +++ b/src/nvim/tui/input.c @@ -373,9 +373,9 @@ static bool handle_bracketed_paste(TermInput *input) tinput_flush(input, true); // Paste phase: "first-chunk". input->paste = 1; - } else { + } else if (input->paste != 0) { // Paste phase: "last-chunk". - input->paste = 3; + input->paste = input->paste == 2 ? 3 : -1; tinput_flush(input, true); // Paste phase: "disabled". input->paste = 0; |