Skip to content

Commit

Permalink
fix(rename): cursor placement at word end
Browse files Browse the repository at this point in the history
Move `_set_cursor_to_popup_end()` call after the `_setup_window()` call,
in order to properly place the cursor at the word end, as a20b471 did
not set it properly.

Closes: GH-73
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
  • Loading branch information
filipdutescu committed Nov 13, 2021
1 parent a20b471 commit 37c27fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/renamer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ function renamer.rename(opts)
opts = popup_opts,
border_opts = prompt_opts.border,
}
renamer._set_cursor_to_popup_end()
log.fmt_info('Created "plenary" popup, with options: %s', vim.inspect(renamer._buffers[prompt_win_id]))

renamer._setup_window(prompt_win_id)
renamer._set_cursor_to_popup_end()
log.trace 'Finished setting up the popup.'
renamer._set_prompt_win_style(prompt_win_id)
log.trace 'Finished styling the popup.'
Expand Down

0 comments on commit 37c27fa

Please sign in to comment.