filipdutescu / renamer.nvim

VS Code-like renaming UI for Neovim, writen in Lua.
Apache License 2.0
303 stars 11 forks source link

fix: position when word appears multiple times #48

Closed filipdutescu closed 3 years ago

filipdutescu commented 3 years ago

Motivation

Refactor logic for renamer._get_word_boundaries_in_line() to give the closest word start and end positions relative to the received position in the line. Move function to utils.get_word_boundaries_in_line() and make tests for the new logic.

Closes: GH-43

Proposed changes

Test plan

New test cases are defined in lua/tests/utils_spec.lua.