Mercurial > vim
comparison src/screen.c @ 9665:b193bdb6ea25 v7.4.2109
commit https://github.com/vim/vim/commit/ad9c2a08f0509294269a2f11a59a438b944bdd5a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 27 23:26:04 2016 +0200
patch 7.4.2109
Problem: Setting 'display' to "lastline" is a drastic change, while
omitting it results in lots of "@" lines.
Solution: Add "truncate" to show "@@@" for a truncated line.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 27 Jul 2016 23:30:05 +0200 |
parents | fd9727ae3c49 |
children | a990e7ed260b |
comparison
equal
deleted
inserted
replaced
9664:aba5d9a93af9 | 9665:b193bdb6ea25 |
---|---|
2016 #endif | 2016 #endif |
2017 if (idx < wp->w_lines_valid | 2017 if (idx < wp->w_lines_valid |
2018 && wp->w_lines[idx].wl_valid | 2018 && wp->w_lines[idx].wl_valid |
2019 && wp->w_lines[idx].wl_lnum == lnum | 2019 && wp->w_lines[idx].wl_lnum == lnum |
2020 && lnum > wp->w_topline | 2020 && lnum > wp->w_topline |
2021 && !(dy_flags & DY_LASTLINE) | 2021 && !(dy_flags & (DY_LASTLINE | DY_TRUNCATE)) |
2022 && srow + wp->w_lines[idx].wl_size > wp->w_height | 2022 && srow + wp->w_lines[idx].wl_size > wp->w_height |
2023 #ifdef FEAT_DIFF | 2023 #ifdef FEAT_DIFF |
2024 && diff_check_fill(wp, lnum) == 0 | 2024 && diff_check_fill(wp, lnum) == 0 |
2025 #endif | 2025 #endif |
2026 ) | 2026 ) |
2137 /* Window ends in filler lines. */ | 2137 /* Window ends in filler lines. */ |
2138 wp->w_botline = lnum; | 2138 wp->w_botline = lnum; |
2139 wp->w_filler_rows = wp->w_height - srow; | 2139 wp->w_filler_rows = wp->w_height - srow; |
2140 } | 2140 } |
2141 #endif | 2141 #endif |
2142 else if (dy_flags & DY_TRUNCATE) /* 'display' has "truncate" */ | |
2143 { | |
2144 int scr_row = W_WINROW(wp) + wp->w_height - 1; | |
2145 | |
2146 /* | |
2147 * Last line isn't finished: Display "@@@" in the last screen line. | |
2148 */ | |
2149 screen_puts_len((char_u *)"@@", 2, scr_row, W_WINCOL(wp), | |
2150 hl_attr(HLF_AT)); | |
2151 screen_fill(scr_row, scr_row + 1, | |
2152 (int)W_WINCOL(wp) + 2, (int)W_ENDCOL(wp), | |
2153 '@', ' ', hl_attr(HLF_AT)); | |
2154 set_empty_rows(wp, srow); | |
2155 wp->w_botline = lnum; | |
2156 } | |
2142 else if (dy_flags & DY_LASTLINE) /* 'display' has "lastline" */ | 2157 else if (dy_flags & DY_LASTLINE) /* 'display' has "lastline" */ |
2143 { | 2158 { |
2144 /* | 2159 /* |
2145 * Last line isn't finished: Display "@@@" at the end. | 2160 * Last line isn't finished: Display "@@@" at the end. |
2146 */ | 2161 */ |