https://github.com/vim/vim/pull/20144
(9 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Heres a script for highlighted put (adapted from hlyank plugin)
vim9script def HighlightedPut() var hlgroup = get(g:, "hlput_hlgroup", "IncSearch") var duration = min([get(g:, "hlput_duration", 300), 3000]) var [beg, end] = [getpos("'["), getpos("']")] var type = v:event.regtype ?? 'v' var pos = getregionpos(beg, end, {type: type, exclusive: false}) var m = matchaddpos(hlgroup, pos->mapnew((_, v) => { var col_beg = v[0][2] + v[0][3] var col_end = v[1][2] + v[1][3] + 1 return [v[0][1], col_beg, col_end - col_beg] })) var winid = win_getid() timer_start(duration, (_) => { if winbufnr(winid) != -1 m->matchdelete(winid) endif }) enddef augroup hlput autocmd! autocmd TextPutPost * HighlightedPut() augroup END
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq commented on this pull request.
In src/testdir/test_autocmd.vim:
> @@ -5967,4 +5967,97 @@ func Test_autocmd_add_secure()
call assert_fails('sandbox call autocmd_delete([{"event": "BufRead"}])', 'E48:')
endfunc
+func Test_TextPostX()
⬇️ Suggested change
-func Test_TextPostX() +func Test_TextPutX()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq commented on this pull request.
In src/register.c:
> + // register type
+ switch (get_reg_type(regname, ®len))
+ {
+ case MLINE:
+ buf[0] = 'V';
+ buf[1] = NUL;
+ buflen = 1;
+ break;
+ case MCHAR:
+ buf[0] = 'v';
+ buf[1] = NUL;
+ buflen = 1;
+ break;
+ case MBLOCK:
+ buflen = vim_snprintf_safelen((char *)buf, sizeof(buf),
+ "%c%ld", Ctrl_V, reglen + 1);
+ break;
+ default:
+ buf[0] = NUL;
+ buflen = 0;
+ break;
+ }
This code is the same as yank_do_autocmd(). I think it should be deduplicated.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@64-bitman pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks. Does this handle arbitrary complex content from e.g. the expression register?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thanks. Does this handle arbitrary complex content from e.g. the expression register?
Well the autocommands trigger for the expression register, however you cannot set the register contents before it is put, since the expression register + the other special registers don't have a yankreg_T associated with them.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()