SF.net SVN: geany:[4346] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Oct 20 16:01:07 UTC 2009
Revision: 4346
http://geany.svn.sourceforge.net/geany/?rev=4346&view=rev
Author: ntrel
Date: 2009-10-20 16:01:07 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
Add 'Select to previous/next word part' keybindings.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/keybindings.c
trunk/src/keybindings.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-20 15:45:07 UTC (rev 4345)
+++ trunk/ChangeLog 2009-10-20 16:01:07 UTC (rev 4346)
@@ -8,6 +8,8 @@
Add 'Word part completion' keybinding so keys other than Tab can be
used, or to clear/change the combination so Tab does full completion
like before.
+ * src/keybindings.c, src/keybindings.h, doc/geany.txt, doc/geany.html:
+ Add 'Select to previous/next word part' keybindings.
2009-10-19 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2009-10-20 15:45:07 UTC (rev 4345)
+++ trunk/doc/geany.html 2009-10-20 16:01:07 UTC (rev 4346)
@@ -3317,6 +3317,14 @@
<td>Selects the current line under the cursor (and any
partially selected lines).</td>
</tr>
+<tr><td>Select to previous word part</td>
+<td> </td>
+<td>(Extend) selection to previous word part boundary.</td>
+</tr>
+<tr><td>Select to next word part</td>
+<td> </td>
+<td>(Extend) selection to next word part boundary.</td>
+</tr>
</tbody>
</table>
</div>
@@ -5780,7 +5788,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2009-10-20 15:26 UTC.
+Generated on: 2009-10-20 15:55 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2009-10-20 15:45:07 UTC (rev 4345)
+++ trunk/doc/geany.txt 2009-10-20 16:01:07 UTC (rev 4346)
@@ -2958,6 +2958,10 @@
Select current line(s) Alt-Shift-L Selects the current line under the cursor (and any
partially selected lines).
+
+Select to previous word part (Extend) selection to previous word part boundary.
+
+Select to next word part (Extend) selection to next word part boundary.
=============================== ========================= ==================================================
Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2009-10-20 15:45:07 UTC (rev 4345)
+++ trunk/src/keybindings.c 2009-10-20 16:01:07 UTC (rev 4346)
@@ -311,6 +311,10 @@
GDK_l, GDK_SHIFT_MASK | GDK_MOD1_MASK, "edit_selectline", _("Select current line(s)"), NULL);
keybindings_set_item(group, GEANY_KEYS_SELECT_PARAGRAPH, NULL,
GDK_p, GDK_SHIFT_MASK | GDK_MOD1_MASK, "edit_selectparagraph", _("Select current paragraph"), NULL);
+ keybindings_set_item(group, GEANY_KEYS_SELECT_WORDPARTLEFT, NULL,
+ 0, 0, "edit_selectwordpartleft", _("Select to previous word part"), NULL);
+ keybindings_set_item(group, GEANY_KEYS_SELECT_WORDPARTRIGHT, NULL,
+ 0, 0, "edit_selectwordpartright", _("Select to next word part"), NULL);
group = ADD_KB_GROUP(FORMAT, _("Format"), cb_func_format_action);
@@ -2267,6 +2271,7 @@
static gboolean cb_func_select_action(guint key_id)
{
GeanyDocument *doc;
+ ScintillaObject *sci;
GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(main_widgets.window));
static GtkWidget *scribble_widget = NULL;
@@ -2283,6 +2288,7 @@
/* keybindings only valid when scintilla widget has focus */
if (doc == NULL || focusw != GTK_WIDGET(doc->editor->sci))
return TRUE;
+ sci = doc->editor->sci;
switch (key_id)
{
@@ -2298,6 +2304,12 @@
case GEANY_KEYS_SELECT_PARAGRAPH:
editor_select_paragraph(doc->editor);
break;
+ case GEANY_KEYS_SELECT_WORDPARTLEFT:
+ sci_send_command(sci, SCI_WORDPARTLEFTEXTEND);
+ break;
+ case GEANY_KEYS_SELECT_WORDPARTRIGHT:
+ sci_send_command(sci, SCI_WORDPARTRIGHTEXTEND);
+ break;
}
return TRUE;
}
Modified: trunk/src/keybindings.h
===================================================================
--- trunk/src/keybindings.h 2009-10-20 15:45:07 UTC (rev 4345)
+++ trunk/src/keybindings.h 2009-10-20 16:01:07 UTC (rev 4346)
@@ -171,6 +171,8 @@
GEANY_KEYS_SELECT_WORD,
GEANY_KEYS_SELECT_LINE,
GEANY_KEYS_SELECT_PARAGRAPH,
+ GEANY_KEYS_SELECT_WORDPARTLEFT,
+ GEANY_KEYS_SELECT_WORDPARTRIGHT,
GEANY_KEYS_SELECT_COUNT
};
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