Skip to content

Conversation

bfredl
Copy link
Member

@bfredl bfredl commented May 27, 2017

maybe should be nvim_win_put if an ui drops data over a specific window. Or maybe it should just do atomic(set_current_window, nvim_put) in that case....

@bfredl
Copy link
Member Author

bfredl commented May 27, 2017

works in insert mode, but redo doesn't work (neither in normal nor insert mode)

@bfredl
Copy link
Member Author

bfredl commented May 28, 2017

redo could be implemented as such: put the contents in the drop register, and add "~p (resp. <c-r><c-o>~ ) to the redo buffer. But it won't work if one puts several different texts during the same insert mode.

@bfredl
Copy link
Member Author

bfredl commented May 28, 2017

Alternatively consider it a low-level primitive and let redo be implemented by the plugin using this. But "~ would make sense for UI initiated put.

@justinmk
Copy link
Member

But it won't work if one puts several different texts during the same insert mode.

Could it be a linked list?

BTW where is insert-mode implied? What happens if nvim_put is called in some other mode?

@bfredl
Copy link
Member Author

bfredl commented May 28, 2017

implied how? It just doesn't do anything special on insert mode (except CURSEND on the latest push). Make "~ a linked list how? Or yet a set of numbered registers?

@bfredl
Copy link
Member Author

bfredl commented May 28, 2017

What happens if nvim_put is called in some other mode?

It does what we want it to do. In visual mode we can either do nothing special (except adjusting cursor/VIsual afterward), most flexible for plugins, or simulate the delete implicit in vp, most convenient for UIs. I guess in cmdline mode it should also emulate <c-r><c-r>.

@marvim marvim added the WIP label Jun 18, 2017
@justinmk justinmk added api libnvim, Nvim RPC API enhancement labels Aug 19, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 19, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 19, 2019
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 19, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 20, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 20, 2019
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 20, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 20, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 20, 2019
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 20, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 21, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 21, 2019
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 21, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 24, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 24, 2019
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 24, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 26, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 26, 2019
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 26, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 26, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 26, 2019
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 26, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 27, 2019
justinmk pushed a commit to justinmk/neovim that referenced this pull request Aug 27, 2019
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 27, 2019
@bfredl bfredl closed this Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api libnvim, Nvim RPC API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants