Skip to content

Commit

Permalink
Merge pull request #12 from Anaminus/master
Browse files Browse the repository at this point in the history
Fix failed rename when line contains a '%' character.
  • Loading branch information
alvarolm authored Jul 7, 2018
2 parents 694cb40 + 4cc9a36 commit a9f7690
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion goRename.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,14 @@ def rename_name_input(name):
debug('flags:', flags)

global renameMe
renameMe['compiled_message'] = message % ('%s',word, name, line_number, byte_begin, compile_flags(True), line_string)
renameMe['compiled_message'] = message % ('%s',
word.replace('%', '%%'),
name.replace('%', '%%'),
line_number,
byte_begin,
str(compile_flags(True)).replace('%', '%%'),
line_string.replace('%', '%%'),
)
self.write_running(renameMe['compiled_message'] % ('[press ENTER to continue]'), True, True)
renameMe['offset'] = byte_begin
renameMe['name'] = name
Expand Down

0 comments on commit a9f7690

Please sign in to comment.