diff options
author | Ricky Zhou <ricky@rzhou.org> | 2018-08-25 15:07:52 -0700 |
---|---|---|
committer | Ricky Zhou <ricky@rzhou.org> | 2018-09-03 03:25:02 -0700 |
commit | 8fd3725cc8d54bced0a8fe1474986d93e9ef0b5b (patch) | |
tree | 30370753fb95186f9259db5809bff30f13453634 /src/nvim/ui.h | |
parent | 7ff63fcdc0ba1ce2b8500641f3742d5ada68d496 (diff) | |
download | rneovim-8fd3725cc8d54bced0a8fe1474986d93e9ef0b5b.tar.gz rneovim-8fd3725cc8d54bced0a8fe1474986d93e9ef0b5b.tar.bz2 rneovim-8fd3725cc8d54bced0a8fe1474986d93e9ef0b5b.zip |
tui: Hint wrapped lines to terminals.
Previously, when neovim would wrap a line across multiple lines,
terminal emulators could not detect that the lines represent a single
wrapped line as opposed to several separate lines. As a result, many
terminals' selection/copying functionality would treat a wrapped line as
several newline-delimited lines.
Fix this by reenabling a "special trick" from Vim. When a line is
wrapped, write the last character of that line followed by the first
character of the next line to the terminal. This hints to the terminal
that the next line is a continuation of the current line.
Extends the raw_line event with a "wrap" parameter which controls when
to do wrap hinting.
Diffstat (limited to 'src/nvim/ui.h')
-rw-r--r-- | src/nvim/ui.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ui.h b/src/nvim/ui.h index 584d8a77c6..df489f569f 100644 --- a/src/nvim/ui.h +++ b/src/nvim/ui.h @@ -47,7 +47,7 @@ struct ui_t { // in to the public grid_line format. void (*raw_line)(UI *ui, Integer grid, Integer row, Integer startcol, Integer endcol, Integer clearcol, Integer clearattr, - const schar_T *chunk, const sattr_T *attrs); + Boolean wrap, const schar_T *chunk, const sattr_T *attrs); void (*event)(UI *ui, char *name, Array args, bool *args_consumed); void (*stop)(UI *ui); void (*inspect)(UI *ui, Dictionary *info); |