Mercurial > vim
comparison src/misc1.c @ 29621:f1ed6f520d09 v9.0.0151
patch 9.0.0151: a "below" aligned text property does not work with 'nowrap'
Commit: https://github.com/vim/vim/commit/4d91d347e65a5621621ea1e3c97dce2c677ed71d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 6 13:48:20 2022 +0100
patch 9.0.0151: a "below" aligned text property does not work with 'nowrap'
Problem: A "below" aligned text property does not work with 'nowrap'.
Solution: Start a new screen line to display the virtual text.
(closes #10851)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 06 Aug 2022 15:00:03 +0200 |
parents | 057c26b5c33a |
children | fc0f93590fd4 |
comparison
equal
deleted
inserted
replaced
29620:1e975951ffb7 | 29621:f1ed6f520d09 |
---|---|
362 int winheight) // when TRUE limit to window height | 362 int winheight) // when TRUE limit to window height |
363 { | 363 { |
364 #endif | 364 #endif |
365 int lines; | 365 int lines; |
366 | 366 |
367 if (!wp->w_p_wrap) | |
368 return 1; | |
369 | |
370 if (wp->w_width == 0) | 367 if (wp->w_width == 0) |
371 return 1; | 368 return 1; |
372 | 369 |
373 #ifdef FEAT_FOLDING | 370 #ifdef FEAT_FOLDING |
374 // Folded lines are handled just like an empty line. | 371 // Folded lines are handled just like an empty line. |
375 // NOTE: Caller must handle lines that are MAYBE folded. | 372 // NOTE: Caller must handle lines that are MAYBE folded. |
376 if (lineFolded(wp, lnum) == TRUE) | 373 if (lineFolded(wp, lnum) == TRUE) |
377 return 1; | 374 return 1; |
378 #endif | 375 #endif |
379 | 376 |
380 lines = plines_win_nofold(wp, lnum); | 377 if (!wp->w_p_wrap) |
378 lines = 1 | |
379 #ifdef FEAT_PROP_POPUP | |
380 // add a line for each "below" aligned text property | |
381 + prop_count_below(wp->w_buffer, lnum) | |
382 #endif | |
383 ; | |
384 else | |
385 lines = plines_win_nofold(wp, lnum); | |
386 | |
381 if (winheight > 0 && lines > wp->w_height) | 387 if (winheight > 0 && lines > wp->w_height) |
382 return wp->w_height; | 388 return wp->w_height; |
383 return lines; | 389 return lines; |
384 } | 390 } |
385 | 391 |