From 54d07b648c56d8f29755bb7139476dff952e8513 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 18 Oct 2020 00:01:05 -0400 Subject: vim-patch:8.2.0943: displaying ^M or ^J depends on current buffer Problem: Displaying ^M or ^J depends on current buffer. Solution: Pass the displayed buffer to transchar(). (closes vim/vim#6225) https://github.com/vim/vim/commit/32ee627750e8b7b3fa6516b893e72f6e6af54710 N/A patches for version.c: vim-patch:8.2.0862: ":term ++curwin" makes the current buffer hidden Problem: ":term ++curwin" makes the current buffer hidden. (Harm te Hennepe) Solution: Do not hide the current buffer. (closes vim/vim#6170) https://github.com/vim/vim/commit/b10090928cb5283f867e8457b7eea0985470d8d4 --- src/nvim/testdir/test_display.vim | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index a177f6140e..66b016c8b2 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -202,6 +202,30 @@ func Test_edit_long_file_name() call delete(longName) endfunc +func Test_unprintable_fileformats() + CheckScreendump + + call writefile(["unix\r", "two"], 'Xunix.txt') + call writefile(["mac\r", "two"], 'Xmac.txt') + let lines =<< trim END + edit Xunix.txt + split Xmac.txt + edit ++ff=mac + END + let filename = 'Xunprintable' + call writefile(lines, filename) + let buf = RunVimInTerminal('-S '.filename, #{rows: 9, cols: 50}) + call VerifyScreenDump(buf, 'Test_display_unprintable_01', {}) + call term_sendkeys(buf, "\\\") + call VerifyScreenDump(buf, 'Test_display_unprintable_02', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xunix.txt') + call delete('Xmac.txt') + call delete(filename) +endfunc + " Test for scrolling that modifies buffer during visual block func Test_visual_block_scroll() " See test/functional/legacy/visual_mode_spec.lua -- cgit