Skip to content

Conversation

filipdutescu
Copy link
Owner

Motivation

BREAKING CHANGE: Validate if the window height and width allow for the popup to be drawn, otherwise fallback to vim.lsp.buf.rename() and log an error.

Closes: GH-12

Proposed changes

  • update rename() to fallback to vim.lsp.buf.rename() if there is no space to draw the popup

Test plan

Existing tests are updated to cover the new functionality and new test cases are also added in lua/tests/renamer_rename_spec.lua.

@filipdutescu filipdutescu added this to the v1.0.0 milestone Nov 7, 2021
@filipdutescu filipdutescu self-assigned this Nov 7, 2021
@filipdutescu filipdutescu force-pushed the fix/use_default_rename_if_height_too_short branch from 6c6fed5 to 0f8fd8f Compare November 7, 2021 20:44
BREAKING CHANGE: Validate if the window height and width allow for the
popup to be drawn, otherwise fallback to `vim.lsp.buf.rename()` and log
an error.

Closes: GH-12
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
@filipdutescu filipdutescu merged commit 0f8fd8f into develop Nov 7, 2021
@filipdutescu filipdutescu deleted the fix/use_default_rename_if_height_too_short branch November 7, 2021 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Throw error if the popup cannot be drawn above or below the current line.
1 participant