[geany/geany] 40da14: Add keybinding for 'Go to Start of Display Line' (#3182425)

Nick Treleaven git-noreply at xxxxx
Thu Jul 26 00:05:32 UTC 2012


Branch:      refs/heads/document-messages
Author:      Nick Treleaven <nick.treleaven at btinternet.com>
Committer:   Nick Treleaven <nick.treleaven at btinternet.com>
Date:        Mon, 25 Jun 2012 13:31:36
Commit:      40da14b5b1c9006aa4149481eb6a2d43ed4550fa
             https://github.com/geany/geany/commit/40da14b5b1c9006aa4149481eb6a2d43ed4550fa

Log Message:
-----------
Add keybinding for 'Go to Start of Display Line' (#3182425)


Modified Paths:
--------------
    doc/geany.html
    doc/geany.txt
    src/keybindings.c
    src/keybindings.h

Modified: doc/geany.html
31 files changed, 19 insertions(+), 12 deletions(-)
===================================================================
@@ -143,7 +143,7 @@ <h2 class="subtitle" id="a-fast-light-gtk-ide">A fast, light, GTK+ IDE</h2>
 <tr><th class="docinfo-name">Date:</th>
 <td>2012-06-18</td></tr>
 <tr><th class="docinfo-name">Version:</th>
-<td>1.22</td></tr>
+<td>1.23</td></tr>
 </tbody>
 </table>
 <p>Copyright © 2005-2012</p>
@@ -2353,6 +2353,8 @@ <h2 class="subtitle" id="a-fast-light-gtk-ide">A fast, light, GTK+ IDE</h2>
 <dl class="docutils">
 <dt>Line wrapping</dt>
 <dd>Show long lines wrapped around to new display lines.</dd>
+</dl>
+<dl class="docutils" id="smart-home-key">
 <dt>"Smart" home key</dt>
 <dd>Whether to move the cursor to the first non-whitespace character
 on the line when you hit the home key on your keyboard. Pressing it
@@ -4196,29 +4198,34 @@ <h2 class="subtitle" id="a-fast-light-gtk-ide">A fast, light, GTK+ IDE</h2>
 </tr>
 <tr><td>Go to Start of Line</td>
 <td>Home</td>
-<td>Move the caret to the end of the line indentation
-unless it is already there, in which case it moves
-it to the start of the line.</td>
+<td>Move the caret to the start of the line.
+Behaves differently if <a class="reference internal" href="#smart-home-key">smart_home_key</a> is set.</td>
 </tr>
 <tr><td>Go to End of Line</td>
 <td>End</td>
 <td>Move the caret to the end of the line.</td>
 </tr>
+<tr><td>Go to Start of Display Line</td>
+<td>Alt-Home</td>
+<td>Move the caret to the start of the display line.
+This is useful when you use line wrapping and
+want to jump to the start of the wrapped, virtual
+line, not the real start of the whole line.
+If the line is not wrapped, it behaves like
+<cite>Go to Start of Line</cite>.</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>
+<cite>Go to End of Line</cite>.</td>
 </tr>
 <tr><td>Go to Previous Word Part</td>
 <td>Ctrl-/</td>
 <td>Goto the previous part of the current word.</td>
 </tr>
 <tr><td>Go to Next Word Part</td>
-<td>Ctrl-</td>
+<td>Ctrl-\</td>
 <td>Goto the next part of the current word.</td>
 </tr>
 </tbody>
@@ -5655,7 +5662,7 @@ <h2 class="subtitle" id="a-fast-light-gtk-ide">A fast, light, GTK+ IDE</h2>
 </tr>
 <tr><td>geanyversion</td>
 <td>The actual Geany version, e.g.
-"Geany 1.22".</td>
+"Geany 1.23".</td>
 <td>file templates, file header,
 function description, ChangeLog entry,
 bsd, gpl, snippets.</td>
@@ -5987,7 +5994,7 @@ <h2 class="subtitle" id="a-fast-light-gtk-ide">A fast, light, GTK+ IDE</h2>
 look, run "<tt class="docutils literal">make doc</tt>" in the subdirectory <tt class="docutils literal">doc</tt> of Geany's source
 directory. This regenerates the <tt class="docutils literal">geany.html</tt> file. To generate a PDF
 file, use the command "<tt class="docutils literal">make pdf</tt>" which should generate a file called
-geany-1.22.pdf.</p>
+geany-1.23.pdf.</p>
 <p>After you are happy with your changes, create a patch e.g. by using:</p>
 <pre class="literal-block">
 % git diff geany.txt > foo.patch
@@ -6788,7 +6795,7 @@ <h2 class="subtitle" id="a-fast-light-gtk-ide">A fast, light, GTK+ IDE</h2>
 <div class="footer">
 <hr class="footer" />
 <a class="reference external" href="geany.txt">View document source</a>.
-Generated on: 2012-06-18 13:25 UTC.
+Generated on: 2012-06-25 13:30 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: doc/geany.txt
21 files changed, 13 insertions(+), 8 deletions(-)
===================================================================
@@ -1977,6 +1977,8 @@ Features
 Line wrapping
     Show long lines wrapped around to new display lines.
 
+.. _smart_home_key:
+
 "Smart" home key
     Whether to move the cursor to the first non-whitespace character
     on the line when you hit the home key on your keyboard. Pressing it
@@ -3486,22 +3488,25 @@ Go to tag definition            Ctrl-T                    Jump to the definition
 Go to tag declaration           Ctrl-Shift-T              Jump to the declaration of the current word or
                                                           selection. See `Go to tag declaration`_.
 
-Go to Start of Line             Home                      Move the caret to the end of the line indentation
-                                                          unless it is already there, in which case it moves
-                                                          it to the start of the line.
+Go to Start of Line             Home                      Move the caret to the start of the line.
+                                                          Behaves differently if smart_home_key_ is set.
 
 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.
+Go to Start of Display Line     Alt-Home                  Move the caret to the start 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.
+                                                          want to jump to the start of the wrapped, virtual
+                                                          line, not the real start of the whole line.
+                                                          If the line is not wrapped, it behaves like
+                                                          `Go to Start of Line`.
+
+Go to End of Display Line       Alt-End                   Move the caret to the end of the display line.
                                                           If the line is not wrapped, it behaves like
-                                                          `Go to End of Line`, see above.
+                                                          `Go to End of Line`.
 
 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.
+Go to Next Word Part            Ctrl-\\                   Goto the next part of the current word.
 =============================== ========================= ==================================================
 
 View keybindings


Modified: src/keybindings.c
7 files changed, 6 insertions(+), 1 deletions(-)
===================================================================
@@ -132,7 +132,7 @@ GeanyKeyBinding *keybindings_get_item(GeanyKeyGroup *group, gsize key_id)
  * Menu accels are set in apply_kb_accel(). */
 /** Fills a GeanyKeyBinding struct item.
  * @note Always set @a key and @a mod to 0, otherwise you will likely
- * cause conflicts with the user's custom, other plugin's keybindings or 
+ * cause conflicts with the user's custom, other plugin's keybindings or
  * future default keybindings.
  * @param group Group.
  * @param key_id Keybinding index for the group.
@@ -484,6 +484,8 @@ static void init_default_kb(void)
 		GDK_Home, 0, "edit_gotolinestart", _("Go to Start of Line"), NULL);
 	add_kb(group, GEANY_KEYS_GOTO_LINEEND, NULL,
 		GDK_End, 0, "edit_gotolineend", _("Go to End of Line"), NULL);
+	add_kb(group, GEANY_KEYS_GOTO_LINESTARTVISUAL, NULL,
+		GDK_Home, GDK_MOD1_MASK, "edit_gotolinestartvisual", _("Go to Start of Display Line"), NULL);
 	add_kb(group, GEANY_KEYS_GOTO_LINEENDVISUAL, NULL,
 		GDK_End, GDK_MOD1_MASK, "edit_gotolineendvisual", _("Go to End of Display Line"), NULL);
 	add_kb(group, GEANY_KEYS_GOTO_PREVWORDPART, NULL,
@@ -1898,6 +1900,9 @@ static gboolean cb_func_goto_action(guint key_id)
 		case GEANY_KEYS_GOTO_LINEEND:
 			sci_send_command(doc->editor->sci, SCI_LINEEND);
 			break;
+		case GEANY_KEYS_GOTO_LINESTARTVISUAL:
+			sci_send_command(doc->editor->sci, SCI_HOMEDISPLAY);
+			break;
 		case GEANY_KEYS_GOTO_LINEENDVISUAL:
 			sci_send_command(doc->editor->sci, SCI_LINEENDDISPLAY);
 			break;


Modified: src/keybindings.h
1 files changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -245,6 +245,7 @@ enum GeanyKeyBindingID
 	GEANY_KEYS_PROJECT_NEW,						/**< Keybinding. */
 	GEANY_KEYS_PROJECT_CLOSE,					/**< Keybinding. */
 	GEANY_KEYS_FORMAT_JOINLINES,				/**< Keybinding. */
+	GEANY_KEYS_GOTO_LINESTARTVISUAL,			/**< Keybinding. */
 	GEANY_KEYS_COUNT	/* must not be used by plugins */
 };
 


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Commits mailing list