diff options
| author | Mike Brumlow <mbrumlow@roblox.com> | 2020-03-19 23:19:36 -0700 |
|---|---|---|
| committer | Mike Brumlow <mbrumlow@roblox.com> | 2020-03-19 23:19:36 -0700 |
| commit | 68f413b03336cff2ef0ec8c0f5bd8ec642c102d9 (patch) | |
| tree | 772b4d86e50b3f2526d06cebd68e18f35b773aaf /vterm-module.h | |
| parent | d02be51ae5c75844134858b683de528997048ec5 (diff) | |
This commit fixes the newlines when copied and pasted.
This commit fixes up the newlines that were inserted for wrapping using the same
approach as term.el does. It does so by adding a property to the '\n' chars that
were inserted as a result of wrapping the terminal. When killing a region text
will be passed through the filter-buffer-substring-function
vterm--remove-fake-newlines removing the wrapped new lines by looking for the
'vterm-line-wrap property and removing the char that corresponds.
If this change set is not up to project standards please work with me to correct
any issues you find.
Diffstat (limited to 'vterm-module.h')
| -rw-r--r-- | vterm-module.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vterm-module.h b/vterm-module.h index 5be8b49..b5e7ebe 100644 --- a/vterm-module.h +++ b/vterm-module.h @@ -90,6 +90,8 @@ static bool compare_cells(VTermScreenCell *a, VTermScreenCell *b); static bool is_key(unsigned char *key, size_t len, char *key_description); static emacs_value render_text(emacs_env *env, Term *term, char *string, int len, VTermScreenCell *cell); +static emacs_value render_fake_newline(emacs_env *env, Term *term, char *string, + int len, VTermScreenCell *cell); static emacs_value color_to_rgb_string(emacs_env *env, Term *term, VTermColor *color); |
