Quramy / tsuquyomi

A Vim plugin for TypeScript

Home Page:http://www.vim.org/scripts/script.php?script_id=5151

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TsuRenameSymbol breaks when symbol occures twice on same line

nextchessmove opened this issue · comments

Given this example source:

interface LongIdentifier { }

function foo(n: LongIdentifier) : LongIdentifier {
  return n;
}

Placing the caret over the first LongIdentifier and running :TsuRenameSymbol to rename LongIdentifier to Foo results in this:

interface Foo { }

function foo(n: Foo) : LongIdentifFoo
  return n;
}

I haven't dug in much to the implementation, but from the looks of it, could applying the changes "rightmost first" fix this?

Thank you for such a great plugin!

I've fixed via #290