Mercurial > vim
view src/testdir/test31.in @ 10801:e7b8be5ecacd v8.0.0290
patch 8.0.0290: cursor positioning wrong if wide character wraps
commit https://github.com/vim/vim/commit/04e87b72c5fa88b7034a5b0ec0be6a7ad763e9d2
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 1 21:23:10 2017 +0100
patch 8.0.0290: cursor positioning wrong if wide character wraps
Problem: If a wide character doesn't fit at the end of the screen line, and
the line doesn't fit on the screen, then the cursor position may
be wrong. (anliting)
Solution: Don't skip over wide character. (Christian Brabandt, closes #1408)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 01 Feb 2017 21:30:04 +0100 |
parents | ef60fac8f3eb |
children |
line wrap: on
line source
Test for commands that close windows and/or buffers: :quit :close :hide :only :sall :all :ball :buf :edit STARTTEST :so small.vim GA 1:$w! Xtest1 $r2:$w! Xtest2 $r3:$w! Xtest3 :n! Xtest1 Xtest2 A 1:set hidden :" test for working :n when hidden set; write "testtext 2" :n :w! test.out :" test for failing :rew when hidden not set; write "testtext 2 2" :set nohidden A 2:rew :w >>test.out :" test for working :rew when hidden set; write "testtext 1 1" :set hidden :rew :w >>test.out :" test for :all keeping a buffer when it's modified; write "testtext 1 1 1" :set nohidden A 1:sp :n Xtest2 Xtest3 :all :1wincmd w :w >>test.out :" test abandoning changed buffer, should be unloaded even when 'hidden' set :" write "testtext 2 2" twice :set hidden A 1:q! :w >>test.out :unhide :w >>test.out :" test ":hide" hides anyway when 'hidden' not set; write "testtext 3" :set nohidden A 2:hide :w >>test.out :" test ":edit" failing in modified buffer when 'hidden' not set :" write "testtext 3 3" A 3:e Xtest1 :w >>test.out :" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1" :set hidden :e Xtest1 :w >>test.out :" test ":close" not hiding when 'hidden' not set in modified buffer; :" write "testtext 3 3 3" :sp Xtest3 :set nohidden A 3:close :w >>test.out :" test ":close!" does hide when 'hidden' not set in modified buffer; :" write "testtext 1" A 3:close! :w >>test.out :set nohidden :" test ":all!" hides changed buffer; write "testtext 2 2 2" :sp Xtest4 GA 4:all! :1wincmd w :w >>test.out :" :" test ":q!" and hidden buffer. :bw! Xtest1 Xtest2 Xtest3 Xtest4 :sp Xtest1 :wincmd w :bw! :set modified :bot sp Xtest2 :set modified :bot sp Xtest3 :set modified :wincmd t :hide :q! :w >>test.out :q! :w >>test.out :q! :call append(line('$'), "Oh, Not finished yet.") :w >>test.out :qa! ENDTEST testtext