Skip to content

[Bug] Error when attempting to rename empty space #95

@EtiamNullam

Description

@EtiamNullam

Describe the bug

Invoking rename method will throw this error when you attempt it on empty space:

E5108: Error executing lua ~\.vim-plug\renamer.nvim/lua/renamer/init.lua:129: attempt to perform arithmetic on local 'word_start' (a nil value)
stack traceback:
	~\.vim-plug\renamer.nvim/lua/renamer/init.lua:129: in function 'rename'
	[string ":lua"]:1: in main chunk

To reproduce

Steps to reproduce the behavior:

  1. Place cursor on space or newline.
  2. Run lua require('renamer').rename().
  3. See error.

Expected behavior

There should be short and less distracting message displayed instead.

Environment

  • Renamer: v3.0.2
  • Neovim: v0.5.1
  • OS: Windows, version: 10

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions