mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 23:48:32 +00:00
feat(prompt): prompt_getinput() gets current input #34491
Problem: Not easy to get user-input in prompt-buffer before the user submits the input. Under the current system user/plugin needs to read the buffer contents, figure out where the prompt is, then extract the text. Solution: - Add prompt_getinput(). - Extract prompt text extraction logic to a separate function
This commit is contained in:
@@ -1078,7 +1078,7 @@ check_pum:
|
||||
return 0;
|
||||
}
|
||||
if ((mod_mask & MOD_MASK_SHIFT) == 0 && bt_prompt(curbuf)) {
|
||||
invoke_prompt_callback();
|
||||
prompt_invoke_callback();
|
||||
if (!bt_prompt(curbuf)) {
|
||||
// buffer changed to a non-prompt buffer, get out of
|
||||
// Insert mode
|
||||
|
Reference in New Issue
Block a user