浏览代码

Bug fix: The !K and !\ custom command and PuTTY patterns were not included in syntax hint

See Bug 2107 and 0cbf6e94

Source commit: 1fbd1d4e42560cceaec4b4cfb62ef1456d116caf
Martin Prikryl 2 年之前
父节点
当前提交
a50437bfc1
共有 4 个文件被更改,包括 9 次插入1 次删除
  1. 2 0
      source/forms/CustomCommand.cpp
  2. 3 1
      source/forms/Preferences.cpp
  3. 2 0
      source/resource/TextsWin.h
  4. 2 0
      source/resource/TextsWin1.rc

+ 2 - 0
source/forms/CustomCommand.cpp

@@ -47,6 +47,8 @@ __fastcall TCustomCommandDialog::TCustomCommandDialog(TComponent* Owner,
   FOnValidate = OnValidate;
   std::unique_ptr<TStrings> HintStrings(TextToStringList(LoadStr(CUSTOM_COMMAND_PATTERNS_HINT5)));
   HintStrings->Insert(6, LoadStr(CUSTOM_COMMAND_PATTERNS_HINT6));
+  HintStrings->Insert(11, LoadStr(PATTERNS_HINT_K));
+  HintStrings->Insert(18, LoadStr(PATTERNS_HINT_BACKSLASH));
   HintLabel(HintText, TrimRight(StringsToText(HintStrings.get())));
 
   int CaptionRes;

+ 3 - 1
source/forms/Preferences.cpp

@@ -104,7 +104,9 @@ __fastcall TPreferencesDialog::TPreferencesDialog(
 
   HintLabel(ShellIconsText2);
   HotTrackLabel(CopyParamLabel);
-  HintLabel(PuttyPathHintText, LoadStr(PUTTY_PATTERNS_HINT2));
+  std::unique_ptr<TStrings> PuttyPathHintStrings(TextToStringList(LoadStr(PUTTY_PATTERNS_HINT2)));
+  PuttyPathHintStrings->Insert(7, LoadStr(PATTERNS_HINT_K));
+  HintLabel(PuttyPathHintText, TrimRight(StringsToText(PuttyPathHintStrings.get())));
 
   EditorEncodingCombo->Items->Add(DefaultEncodingName());
   EditorEncodingCombo->Items->Add(LoadStr(UTF8_NAME));

+ 2 - 0
source/resource/TextsWin.h

@@ -310,6 +310,8 @@
 #define MESSAGE_DISMISS         1597
 #define USAGE_PASSWORDSFROMFILES 1598
 #define UPDATE_CURRENT          1599
+#define PATTERNS_HINT_K         7000
+#define PATTERNS_HINT_BACKSLASH 7001
 
 #define WIN_FORMS_STRINGS       1600
 #define COPY_FILE               1605

+ 2 - 0
source/resource/TextsWin1.rc

@@ -315,6 +315,8 @@ BEGIN
         MESSAGE_DISMISS, "Dismiss"
         USAGE_PASSWORDSFROMFILES, "Read all passwords from files"
         UPDATE_CURRENT, "Your version: %s"
+        PATTERNS_HINT_K, "!K expands to current session private key path"
+        PATTERNS_HINT_BACKSLASH, "!\\ expands to current local path"
 
         WIN_FORMS_STRINGS, "WIN_FORMS_STRINGS"
         COPY_FILE, "%s file '%s' to %s:"