You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just missed the fact that getreg() also works and I don't need to hack
to use clip_convert_selection() and the mod on it. This is kind of...
odd, because clip_convert_selection() is essentially doing the same
thing as getreg() with *very* minor differences. You would hope that
would be consolidated and refactored into a single function, but of
course not.
Also cleaned up some comments to make it clear that evaluateExpression
probably would have worked except for the autocmd blocking part.
// Step 3: Extract the text from the yank ('0') register.
1427
+
const char_u *str = get_reg_contents(0, 0);
1429
1428
1430
1429
// Step 4: Clean up the yank register, and restore it back.
1431
1430
set_y_current(target_reg); // should not be necessary as it's done in do_pending_operator above (since regname was set to 0), but just to be safe and verbose in intention.
@@ -1447,7 +1446,7 @@ static int extractSelectedText(char_u **str, long_u *len)
1447
1446
1448
1447
unblock_autocmds();
1449
1448
1450
-
returnconvert_result;
1449
+
returnstr;
1451
1450
}
1452
1451
1453
1452
/// Extract the currently selected text (in visual mode) and send that to the
0 commit comments