Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: various errors and logs #97

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Conversation

filipdutescu
Copy link
Owner

@filipdutescu filipdutescu commented Nov 29, 2021

Motivation

Prevent the popup from being drawn if the cursor is on an empty space and log a debug message regarding it.

Add lua/renamer/constants.lua to store all reused hardcoded strings and any other strings that should be managed in a proper way.

Closes: GH-95

Proposed changes

  • add lua/renamer/constants.lua
  • replace hardcoded strings with the new constants defined
  • fix renamer.rename() to not allow renaming on empty strings, such as ' '

Test plan

Existing tests are updated and a new one is added to validate the new behaviour.

@filipdutescu filipdutescu added this to the 3.0.3 milestone Nov 29, 2021
@filipdutescu filipdutescu self-assigned this Nov 29, 2021
@github-actions github-actions bot added the fix label Nov 29, 2021
@github-actions github-actions bot added the test label Nov 29, 2021
@filipdutescu filipdutescu changed the title fix: various erros and logs fix: various errors and logs Nov 29, 2021
@filipdutescu filipdutescu force-pushed the fix/empty_word_rename_error branch 4 times, most recently from b4a9937 to dd25890 Compare November 29, 2021 18:27
Prevent the popup from being drawn if the cursor is on an empty space
and log a debug message regarding it.

Add `lua/renamer/constants.lua` to store all reused hardcoded strings
and any other strings that should be managed in a proper way.

Closes: GH-95
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
@filipdutescu filipdutescu marked this pull request as ready for review November 29, 2021 18:28
@filipdutescu filipdutescu merged commit dd25890 into develop Nov 29, 2021
@filipdutescu filipdutescu deleted the fix/empty_word_rename_error branch November 29, 2021 18:32
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.

[Bug] Error when attempting to rename empty space
1 participant