vi: fix refusal to save buffers with single insert/change modification - #107
Open
frno7 wants to merge 1 commit into
Open
vi: fix refusal to save buffers with single insert/change modification#107frno7 wants to merge 1 commit into
frno7 wants to merge 1 commit into
Conversation
Starting new change sets on vi_insert = 1 assignments is a provisional fix, because undo history will not be optimal. However, refusing to save modified buffers is a fatal problem for the editor. A single edit, with insert (or change) only, did not save the buffer: $ rm -f a && echo -e 'iabcd\eZZ' | ./vi -v a >/dev/null && cat a cat: a: No such file or directory However, editing twice, with insert followed by append, works as expected: $ rm -f a && echo -e 'iab\eacd\eZZ' | ./vi -v a >/dev/null && cat a abcd Fixes: ca69c12 ("vi: handle insert mode commands in vi.c")
Owner
|
Fredrik Noring ***@***.***> wrote:
Starting new change sets on `vi_insert = 1` assignments is a provisional fix, because undo history will not be optimal. However, refusing to save modified buffers is a fatal problem for the editor.
A single edit, with insert (or change) only, did not save the buffer:
```shell
$ rm -f a && echo -e "iabcd\eZZ" | ./vi -v a >/dev/null && cat a
cat: a: No such file or directory
```
Thanks for the patch. I cannot reproduce it with this command though.
I wonder what is different in my setup.
Ali
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting new change sets on
vi_insert = 1assignments is a provisional fix, because undo history will not be optimal. However, refusing to save modified buffers is a fatal problem for the editor.A single edit, with insert (or change) only, did not save the buffer:
However, editing twice, with insert followed by append, works as expected:
Fixes: ca69c12 ("vi: handle insert mode commands in vi.c")