mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
vim-patch:9.0.0681: "<<<" shows for 'smoothscroll' even when 'showbreak is set
Problem: "<<<" shows for 'smoothscroll' even when 'showbreak is set.
Solution: When 'showbreak' is set do not display "<<<".
0937b9fb24
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
34a4f3729c
commit
2918720add
@ -22,7 +22,7 @@
|
||||
#include "nvim/highlight.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/message.h"
|
||||
#include "nvim/option_defs.h"
|
||||
#include "nvim/option.h"
|
||||
#include "nvim/types.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/vim.h"
|
||||
@ -530,8 +530,9 @@ void grid_put_linebuf(ScreenGrid *grid, int row, int coloff, int endcol, int cle
|
||||
max_off_from = linebuf_size;
|
||||
max_off_to = grid->line_offset[row] + (size_t)grid->cols;
|
||||
|
||||
if (topline && wp->w_skipcol > 0) {
|
||||
// Take care of putting "<<<" on the first line for 'smoothscroll'.
|
||||
if (topline && wp->w_skipcol > 0 && *get_showbreak_value(wp) == NUL) {
|
||||
// Take care of putting "<<<" on the first line for 'smoothscroll'
|
||||
// when 'showbreak' is not set.
|
||||
for (int i = 0; i < 3; i++) {
|
||||
schar_from_ascii(linebuf_char[i], '<');
|
||||
linebuf_attr[i] = HL_ATTR(HLF_AT);
|
||||
|
@ -700,7 +700,7 @@ func Test_breakindent19_sbr_nextpage()
|
||||
norm! 5gj
|
||||
let lines = s:screen_lines(1, 20)
|
||||
let expect = [
|
||||
\ "<<<aaaaaaaaaaaaaaaaa",
|
||||
\ ">aaaaaaaaaaaaaaaaaaa",
|
||||
\ ">aaaaaaaaaaaaaaaaaaa",
|
||||
\ ">aaaaaaaaaaaaaaaaaaa",
|
||||
\ ]
|
||||
|
@ -167,7 +167,7 @@ func Test_visual_block_and_selection_exclusive()
|
||||
exe "norm! $3B\<C-v>eAx\<Esc>"
|
||||
let lines = s:screen_lines([1, 10], winwidth(0))
|
||||
let expect = [
|
||||
\ "<<<obar foobar ",
|
||||
\ "+foobar foobar ",
|
||||
\ "+foobar foobar ",
|
||||
\ "+foobar foobar ",
|
||||
\ "+foobar foobar ",
|
||||
|
Loading…
Reference in New Issue
Block a user