SF.net SVN: geany:[3905] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Mon Jun 29 19:46:49 UTC 2009


Revision: 3905
          http://geany.svn.sourceforge.net/geany/?rev=3905&view=rev
Author:   eht16
Date:     2009-06-29 19:46:49 +0000 (Mon, 29 Jun 2009)

Log Message:
-----------
Make the Scintilla keybindings 'Delete to end of line' and  'Go to end of display line' configurable.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/geany.html
    trunk/doc/geany.txt
    trunk/src/editor.c
    trunk/src/keybindings.c
    trunk/src/keybindings.h
    trunk/src/plugindata.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-06-29 19:46:24 UTC (rev 3904)
+++ trunk/ChangeLog	2009-06-29 19:46:49 UTC (rev 3905)
@@ -6,6 +6,10 @@
    list for Tcl files.
  * src/filetypes.c:
    Fix a small memory leak.
+ * doc/geany.html, doc/geany.txt, src/editor.c, src/keybindings.c,
+   src/keybindings.h, src/plugindata.h:
+   Make the Scintilla keybindings 'Delete to end of line' and
+   'Go to end of display line' configurable.
 
 
 2009-06-28  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html	2009-06-29 19:46:24 UTC (rev 3904)
+++ trunk/doc/geany.html	2009-06-29 19:46:49 UTC (rev 3905)
@@ -6,7 +6,7 @@
 <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
 <title>Geany</title>
 <meta name="authors" content="Enrico Tröger  Nick Treleaven  Frank Lanitz" />
-<meta name="date" content="2009-06-22" />
+<meta name="date" content="$Date$" />
 <style type="text/css">
 
 /*
@@ -139,7 +139,7 @@
 <br />Nick Treleaven
 <br />Frank Lanitz</td></tr>
 <tr><th class="docinfo-name">Date:</th>
-<td>2009-06-22</td></tr>
+<td>$Date$</td></tr>
 <tr><th class="docinfo-name">Version:</th>
 <td>0.18</td></tr>
 </tbody>
@@ -2744,6 +2744,11 @@
 <td>Deletes the current line (and any lines with a
 selection).</td>
 </tr>
+<tr><td>Delete to line end</td>
+<td>Ctrl-Shift-Delete</td>
+<td>Deletes from the current caret position to the
+end of the current line.</td>
+</tr>
 <tr><td>Duplicate line or selection</td>
 <td>Ctrl-D</td>
 <td>Duplicates the current line or selection.</td>
@@ -3063,6 +3068,15 @@
 <td>End</td>
 <td>Move the caret to the end of the line.</td>
 </tr>
+<tr><td>Go to End of Display Line</td>
+<td>Alt-End</td>
+<td>Move the caret to the end of the display line.
+This is useful when you use line wrapping and
+want to jump to the end of the wrapped, virtual
+line, not the real end of the whole line.
+If the line is not wrapped, it behaves like
+<cite>Go to End of Line</cite>, see above.</td>
+</tr>
 <tr><td>Go to Previous Word Part</td>
 <td>Ctrl-/</td>
 <td>Goto the previous part of the current word.</td>
@@ -4151,9 +4165,6 @@
 <tr><td>Delete to start of line.</td>
 <td>Ctrl+Shift+BackSpace</td>
 </tr>
-<tr><td>Delete to end of line.</td>
-<td>Ctrl+Shift+Delete</td>
-</tr>
 <tr><td>Go to start of document.</td>
 <td>Ctrl+Home</td>
 </tr>
@@ -4172,9 +4183,6 @@
 <tr><td>Extend selection to end of document.</td>
 <td>Ctrl+Shift+End</td>
 </tr>
-<tr><td>Go to end of display line.</td>
-<td>Alt+End</td>
-</tr>
 <tr><td>Extend selection to end of display line.</td>
 <td>Alt+Shift+End</td>
 </tr>
@@ -4945,7 +4953,7 @@
 <div class="footer">
 <hr class="footer" />
 <a class="reference external" href="geany.txt">View document source</a>.
-Generated on: 2009-06-25 16:54 UTC.
+Generated on: 2009-06-29 19:45 UTC.
 Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
 
 </div>

Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt	2009-06-29 19:46:24 UTC (rev 3904)
+++ trunk/doc/geany.txt	2009-06-29 19:46:49 UTC (rev 3905)
@@ -2541,6 +2541,10 @@
 
 Delete current line(s)          Ctrl-K                    Deletes the current line (and any lines with a
                                                           selection).
+
+Delete to line end              Ctrl-Shift-Delete         Deletes from the current caret position to the
+                                                          end of the current line.
+
 Duplicate line or selection     Ctrl-D                    Duplicates the current line or selection.
 
 Transpose current line          Ctrl-T                    Transposes the current line with the previous one.
@@ -2736,6 +2740,13 @@
 
 Go to End of Line               End                       Move the caret to the end of the line.
 
+Go to End of Display Line       Alt-End                   Move the caret to the end of the display line.
+                                                          This is useful when you use line wrapping and
+                                                          want to jump to the end of the wrapped, virtual
+                                                          line, not the real end of the whole line.
+                                                          If the line is not wrapped, it behaves like
+                                                          `Go to End of Line`, see above.
+
 Go to Previous Word Part        Ctrl-/                    Goto the previous part of the current word.
 
 Go to Next Word Part            Ctrl-\                    Goto the next part of the current word.
@@ -3696,14 +3707,12 @@
 Delete to start of word.                        Ctrl+BackSpace
 Delete to end of word.                          Ctrl+Delete
 Delete to start of line.                        Ctrl+Shift+BackSpace
-Delete to end of line.                          Ctrl+Shift+Delete
 Go to start of document.                        Ctrl+Home
 Extend selection to start of document.          Ctrl+Shift+Home
 Go to start of display line.                    Alt+Home
 Extend selection to start of display line.      Alt+Shift+Home
 Go to end of document.                          Ctrl+End
 Extend selection to end of document.            Ctrl+Shift+End
-Go to end of display line.                      Alt+End
 Extend selection to end of display line.        Alt+Shift+End
 Previous paragraph. Shift extends selection.    Ctrl+Up
 Next paragraph. Shift extends selection.        Ctrl+Down

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2009-06-29 19:46:24 UTC (rev 3904)
+++ trunk/src/editor.c	2009-06-29 19:46:49 UTC (rev 3905)
@@ -4455,12 +4455,14 @@
 	sci_clear_cmdkey(sci, 'T' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line copy */
 	sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16)); /* line cut */
 	sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line delete */
+	sci_clear_cmdkey(sci, SCK_DELETE | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line to end delete */
 	sci_clear_cmdkey(sci, '/' | (SCMOD_CTRL << 16)); /* Previous word part */
 	sci_clear_cmdkey(sci, '\\' | (SCMOD_CTRL << 16)); /* Next word part */
 	sci_clear_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16)); /* scroll line up */
 	sci_clear_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16)); /* scroll line down */
 	sci_clear_cmdkey(sci, SCK_HOME);	/* line start */
 	sci_clear_cmdkey(sci, SCK_END);	/* line end */
+	sci_clear_cmdkey(sci, SCK_END | (SCMOD_ALT << 16));	/* visual line end */
 
 	if (editor_prefs.use_gtk_word_boundaries)
 	{
@@ -4698,10 +4700,6 @@
 
 	/* (dis)allow scrolling past end of document */
 	sci_set_scroll_stop_at_last_line(sci, editor_prefs.scroll_stop_at_last_line);
-
-	sci_assign_cmdkey(sci, SCK_HOME,
-		editor_prefs.smart_home_key ? SCI_VCHOMEWRAP : SCI_HOMEWRAP);
-	sci_assign_cmdkey(sci, SCK_END,  SCI_LINEENDWRAP);
 }
 
 

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2009-06-29 19:46:24 UTC (rev 3904)
+++ trunk/src/keybindings.c	2009-06-29 19:46:49 UTC (rev 3905)
@@ -236,6 +236,9 @@
 		LW(menu_duplicate_line1));
 	keybindings_set_item(group, GEANY_KEYS_EDITOR_DELETELINE, cb_func_editor_action,
 		GDK_k, GDK_CONTROL_MASK, "edit_deleteline", _("Delete current line(s)"), NULL);
+	keybindings_set_item(group, GEANY_KEYS_EDITOR_DELETELINETOEND, cb_func_editor_action,
+		GDK_Delete, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "edit_deletelinetoend",
+		_("Delete to line end"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_EDITOR_TRANSPOSELINE, cb_func_editor_action,
 		GDK_t, GDK_CONTROL_MASK, "edit_transposeline", _("Transpose current line"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_EDITOR_SCROLLTOLINE, cb_func_editor_action,
@@ -386,6 +389,8 @@
 		GDK_Home, 0, "edit_gotolinestart", _("Go to Start of Line"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_GOTO_LINEEND, cb_func_goto_action,
 		GDK_End, 0, "edit_gotolineend", _("Go to End of Line"), NULL);
+	keybindings_set_item(group, GEANY_KEYS_GOTO_LINEENDVISUAL, cb_func_goto_action,
+		GDK_End, GDK_MOD1_MASK, "edit_gotolineendvisual", _("Go to End of Display Line"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_GOTO_PREVWORDSTART, cb_func_goto_action,
 		GDK_slash, GDK_CONTROL_MASK, "edit_prevwordstart", _("Go to Previous Word Part"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_GOTO_NEXTWORDSTART, cb_func_goto_action,
@@ -1771,6 +1776,9 @@
 		case GEANY_KEYS_GOTO_LINEEND:
 			sci_send_command(doc->editor->sci, SCI_LINEEND);
 			break;
+		case GEANY_KEYS_GOTO_LINEENDVISUAL:
+			sci_send_command(doc->editor->sci, SCI_LINEENDDISPLAY);
+			break;
 		case GEANY_KEYS_GOTO_PREVWORDSTART:
 			sci_send_command(doc->editor->sci, SCI_WORDPARTLEFT);
 			break;
@@ -1839,6 +1847,9 @@
 		case GEANY_KEYS_EDITOR_DELETELINE:
 			delete_lines(doc->editor);
 			break;
+		case GEANY_KEYS_EDITOR_DELETELINETOEND:
+			sci_send_command(doc->editor->sci, SCI_DELLINERIGHT);
+			break;
 		case GEANY_KEYS_EDITOR_TRANSPOSELINE:
 			sci_send_command(doc->editor->sci, SCI_LINETRANSPOSE);
 			break;

Modified: trunk/src/keybindings.h
===================================================================
--- trunk/src/keybindings.h	2009-06-29 19:46:24 UTC (rev 3904)
+++ trunk/src/keybindings.h	2009-06-29 19:46:49 UTC (rev 3905)
@@ -132,6 +132,7 @@
 	GEANY_KEYS_EDITOR_AUTOCOMPLETE,
 	GEANY_KEYS_EDITOR_CALLTIP,
 	GEANY_KEYS_EDITOR_MACROLIST,
+	GEANY_KEYS_EDITOR_DELETELINETOEND,
 	GEANY_KEYS_EDITOR_COUNT
 };
 
@@ -224,6 +225,7 @@
 	GEANY_KEYS_GOTO_NEXTWORDSTART,
 	GEANY_KEYS_GOTO_TAGDEFINITION,
 	GEANY_KEYS_GOTO_TAGDECLARATION,
+	GEANY_KEYS_GOTO_LINEENDVISUAL,
 	GEANY_KEYS_GOTO_COUNT
 };
 

Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h	2009-06-29 19:46:24 UTC (rev 3904)
+++ trunk/src/plugindata.h	2009-06-29 19:46:49 UTC (rev 3905)
@@ -45,7 +45,7 @@
 enum {
 	/** The Application Programming Interface (API) version, incremented
 	 * whenever any plugin data types are modified or appended to. */
-	GEANY_API_VERSION = 143,
+	GEANY_API_VERSION = 144,
 
 	/** The Application Binary Interface (ABI) version, incremented whenever
 	 * existing fields in the plugin data types have to be changed or reordered. */


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list