Mercurial > vim
comparison src/testdir/test_breakindent.vim @ 11010:c004e17fa36b v8.0.0394
patch 8.0.0394: tabs are not aligned when scrolling horizontally
commit https://github.com/vim/vim/commit/abc39ab642791ae3d22a524516eeedb673a95d9d
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 1 18:04:05 2017 +0100
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Problem: Tabs are not aligned when scrolling horizontally and a Tab doesn't
fit. (Axel Bender)
Solution: Handle a Tab as a not fitting character. (Christian Brabandt)
Also fix that ":redraw" does not scroll horizontally to show the
cursor. And fix the test that depended on the old behavior.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 01 Mar 2017 18:15:04 +0100 |
parents | 678edb254216 |
children | 2ad722003b36 |
comparison
equal
deleted
inserted
replaced
11009:1a8893be0bea | 11010:c004e17fa36b |
---|---|
272 call s:close_windows() | 272 call s:close_windows() |
273 endfunction | 273 endfunction |
274 | 274 |
275 function Test_breakindent16() | 275 function Test_breakindent16() |
276 " Check that overlong lines are indented correctly. | 276 " Check that overlong lines are indented correctly. |
277 " TODO: currently it does not fail even when the bug is not fixed. | |
278 let s:input="" | 277 let s:input="" |
279 call s:test_windows('setl breakindent briopt=min:0 ts=4') | 278 call s:test_windows('setl breakindent briopt=min:0 ts=4') |
280 call setline(1, "\t".repeat("1234567890", 10)) | 279 call setline(1, "\t".repeat("1234567890", 10)) |
281 resize 6 | 280 resize 6 |
282 norm! 1gg$ | 281 norm! 1gg$ |
283 redraw! | 282 redraw! |
284 let lines=s:screen_lines(1,10) | 283 let lines=s:screen_lines(1,10) |
285 let expect=[ | 284 let expect=[ |
286 \ " 123456", | |
287 \ " 789012", | 285 \ " 789012", |
288 \ " 345678", | 286 \ " 345678", |
287 \ " 901234", | |
289 \ ] | 288 \ ] |
290 call s:compare_lines(expect, lines) | 289 call s:compare_lines(expect, lines) |
291 let lines=s:screen_lines(4,10) | 290 let lines=s:screen_lines(4,10) |
292 let expect=[ | 291 let expect=[ |
293 \ " 901234", | |
294 \ " 567890", | 292 \ " 567890", |
295 \ " 123456", | 293 \ " 123456", |
296 \ ] | 294 \ " 7890 ", |
297 call s:compare_lines(expect, lines) | 295 \ ] |
298 call s:close_windows() | 296 call s:compare_lines(expect, lines) |
299 endfunction | 297 call s:close_windows() |
298 endfunction |