Browse Source

Ctrl+X now also does line if there's selection.

Martijn Laan 1 year ago
parent
commit
77e5d0567c
5 changed files with 9 additions and 1 deletions
  1. BIN
      Files/isscint.dll
  2. 6 0
      ISHelp/isetup.xml
  3. 1 0
      Projects/Src/CompScintEdit.pas
  4. 1 0
      Projects/Src/IsscintInt.pas
  5. 1 1
      whatsnew.htm

BIN
Files/isscint.dll


+ 6 - 0
ISHelp/isetup.xml

@@ -3156,6 +3156,12 @@ Filename: "{win}\MYPROG.INI"; Section: "InstallSettings"; Key: "InstallPath"; St
 <tr>
 <tr>
   <td>Scroll horizontally.</td><td>Shift+MouseWheel</td>
   <td>Scroll horizontally.</td><td>Shift+MouseWheel</td>
 </tr>
 </tr>
+<tr>
+  <td>Cut selection or line.</td><td>Ctrl+X</td>
+</tr>
+<tr>
+  <td>Copy selection or line.</td><td>Ctrl+C</td>
+</tr>
 <tr>
 <tr>
   <td>Cut line.</td><td>Ctrl+L</td>
   <td>Cut line.</td><td>Ctrl+L</td>
 </tr>
 </tr>

+ 1 - 0
Projects/Src/CompScintEdit.pas

@@ -188,6 +188,7 @@ begin
   Call(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH, 0);
   Call(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH, 0);
 
 
   Call(SCI_ASSIGNCMDKEY, Ord('C') or (SCMOD_CTRL shl 16), SCI_COPYALLOWLINE);
   Call(SCI_ASSIGNCMDKEY, Ord('C') or (SCMOD_CTRL shl 16), SCI_COPYALLOWLINE);
+  Call(SCI_ASSIGNCMDKEY, Ord('X') or (SCMOD_CTRL shl 16), SCI_CUTALLOWLINE);
   Call(SCI_ASSIGNCMDKEY, Ord('Z') or ((SCMOD_SHIFT or SCMOD_CTRL) shl 16), SCI_REDO);
   Call(SCI_ASSIGNCMDKEY, Ord('Z') or ((SCMOD_SHIFT or SCMOD_CTRL) shl 16), SCI_REDO);
   Call(SCI_ASSIGNCMDKEY, SCK_UP or (SCMOD_ALT shl 16), SCI_MOVESELECTEDLINESUP);
   Call(SCI_ASSIGNCMDKEY, SCK_UP or (SCMOD_ALT shl 16), SCI_MOVESELECTEDLINESUP);
   Call(SCI_ASSIGNCMDKEY, SCK_DOWN or (SCMOD_ALT shl 16), SCI_MOVESELECTEDLINESDOWN);
   Call(SCI_ASSIGNCMDKEY, SCK_DOWN or (SCMOD_ALT shl 16), SCI_MOVESELECTEDLINESDOWN);

+ 1 - 0
Projects/Src/IsscintInt.pas

@@ -15,6 +15,7 @@ const
   SC_MARK_BACKFORE = 34;
   SC_MARK_BACKFORE = 34;
   STYLE_AUTOCOMPLETION = 40;
   STYLE_AUTOCOMPLETION = 40;
   STYLE_LASTPREDEFINED = 40;
   STYLE_LASTPREDEFINED = 40;
+  SCI_CUTALLOWLINE = 2805;
   SC_MASK_HISTORY = $01E00000;
   SC_MASK_HISTORY = $01E00000;
 
 
 implementation
 implementation

+ 1 - 1
whatsnew.htm

@@ -50,7 +50,7 @@ For conditions of distribution and use, see <a href="files/is/license.txt">LICEN
   <li>The editor's gutter now shows change history to keep track of saved and unsaved modifications.</li>
   <li>The editor's gutter now shows change history to keep track of saved and unsaved modifications.</li>
   <li>The editor's font now defaults to Consolas if available, consistent with most other modern editors.</li>
   <li>The editor's font now defaults to Consolas if available, consistent with most other modern editors.</li>
   <li>The editor can now be scrolled horizontally instead of vertically by holding the Shift key while rotating the mouse wheel. Horizontal scroll wheels are now also supported.</li>
   <li>The editor can now be scrolled horizontally instead of vertically by holding the Shift key while rotating the mouse wheel. Horizontal scroll wheels are now also supported.</li>
-  <li>Copy (Ctrl+C) now copies the entire line if there's no selection, consistent with most other modern editors.</li>
+  <li>Cut (Ctrl+X) and Copy (Ctrl+C) now cut or copy the entire line if there's no selection, consistent with most other modern editors.</li>
   <li>Added shortcuts to move selected lines up or down (Alt+Up and Alt+Down).</li>
   <li>Added shortcuts to move selected lines up or down (Alt+Up and Alt+Down).</li>
   <li>Added a right-click popup menu to the editor's gutter column for breakpoints.</li>
   <li>Added a right-click popup menu to the editor's gutter column for breakpoints.</li>
 </ul>
 </ul>