Mercurial > vim
comparison src/drawline.c @ 30767:5dba398584fd v9.0.0718
patch 9.0.0718: extra empty line between two virtual text "below"
Commit: https://github.com/vim/vim/commit/ccf2837a05cef0ea4913ebff4f2f6000bc050271
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Oct 10 21:10:03 2022 +0100
patch 9.0.0718: extra empty line between two virtual text "below"
Problem: Extra empty line between two virtual text "below" when 'wrap' and
'number' are set.
Solution: Reset "before" when there is no text in the screen line.
(closes #11334)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 10 Oct 2022 22:15:03 +0200 |
parents | 3002177fa0b1 |
children | fc9993c5835a |
comparison
equal
deleted
inserted
replaced
30766:11bee01b89d7 | 30767:5dba398584fd |
---|---|
637 int cont_on_next_line = below && col_with_padding > win_col_off(wp) | 637 int cont_on_next_line = below && col_with_padding > win_col_off(wp) |
638 && !wp->w_p_wrap; | 638 && !wp->w_p_wrap; |
639 | 639 |
640 if (wrap || right || above || below || padding > 0 || n_used < *n_extra) | 640 if (wrap || right || above || below || padding > 0 || n_used < *n_extra) |
641 { | 641 { |
642 int col_off = win_col_off(wp) + win_col_off2(wp); | 642 int col_off = win_col_off(wp) - win_col_off2(wp); |
643 int skip_add = 0; | 643 int skip_add = 0; |
644 | 644 |
645 if (above) | 645 if (above) |
646 { | 646 { |
647 before = 0; | 647 before = 0; |
653 if (right) | 653 if (right) |
654 before -= cells; | 654 before -= cells; |
655 if (before < 0 | 655 if (before < 0 |
656 || !(right || below) | 656 || !(right || below) |
657 || (below | 657 || (below |
658 ? (col_with_padding == 0 || !wp->w_p_wrap) | 658 ? (col_with_padding <= col_off || !wp->w_p_wrap) |
659 : (n_used < *n_extra))) | 659 : (n_used < *n_extra))) |
660 { | 660 { |
661 if (right && (wrap || room < PROP_TEXT_MIN_CELLS)) | 661 if (right && (wrap || room < PROP_TEXT_MIN_CELLS)) |
662 { | 662 { |
663 // right-align on next line instead of wrapping if possible | 663 // right-align on next line instead of wrapping if possible |