gonzales12 / cnpack

Automatically exported from code.google.com/p/cnpack
0 stars 0 forks source link

Do not add "1" to identifier name when using "Rename identifier" #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Select identifier in code
2. Invoke "Rename identifier" dialog (F2)
3. New identifier name is filled as <old_name>+"1"

What is the expected output? What do you see instead?
3. New identifier name should stay as <old_name>

What version of the product are you using? On what operating system?
Latest trunk

Please provide any additional information below.
"Rename identifier" is mostly used to give some meaningful name
(and I guess in most cases - meaningful names do not end with "1") 

Here is required change:
Index: CnSrcEditorKey.pas
===================================================================
--- CnSrcEditorKey.pas  (revision 1374)
+++ CnSrcEditorKey.pas  (working copy)
@@ -1129,7 +1129,7 @@
     begin
       try
         lblReplacePromt.Caption := Format(SCnRenameVarHintFmt, [Cur]);
-        edtRename.Text := Cur + '1';
+        edtRename.Text := Cur;
 //        case Rit of

Original issue reported on code.google.com by VitaliyG...@gmail.com on 24 Sep 2013 at 1:22