Mercurial > vim
comparison src/clipboard.c @ 24790:14b86681e6e6 v8.2.2933
patch 8.2.2933: when 'clipboard' is "unnamed" zp does not work correctly
Commit: https://github.com/vim/vim/commit/6e0b553fa12fc5ad5d8ee3d8457e7cb16f38b56f
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 4 17:11:47 2021 +0200
patch 8.2.2933: when 'clipboard' is "unnamed" zp does not work correctly
Problem: When 'clipboard' is "unnamed" zp and zP do not work correctly.
Solution: Pass -1 to str_to_reg() and fix computing the character width
instead of using the byte length. (Christian Brabandt,
closes #8301, closes #8317)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 04 Jun 2021 17:15:03 +0200 |
parents | 826a6406ea7b |
children | f48c435bd1df |
comparison
equal
deleted
inserted
replaced
24789:dcb034bff83a | 24790:14b86681e6e6 |
---|---|
2088 else | 2088 else |
2089 y_ptr = get_y_register(STAR_REGISTER); | 2089 y_ptr = get_y_register(STAR_REGISTER); |
2090 | 2090 |
2091 clip_free_selection(cbd); | 2091 clip_free_selection(cbd); |
2092 | 2092 |
2093 str_to_reg(y_ptr, type, str, len, 0L, FALSE); | 2093 str_to_reg(y_ptr, type, str, len, -1, FALSE); |
2094 } | 2094 } |
2095 | 2095 |
2096 /* | 2096 /* |
2097 * Convert the '*'/'+' register into a GUI selection string returned in *str | 2097 * Convert the '*'/'+' register into a GUI selection string returned in *str |
2098 * with length *len. | 2098 * with length *len. |