SF.net SVN: geany: [829] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Thu Sep 21 10:31:15 UTC 2006
Revision: 829
http://svn.sourceforge.net/geany/?rev=829&view=rev
Author: ntrel
Date: 2006-09-21 03:31:06 -0700 (Thu, 21 Sep 2006)
Log Message:
-----------
Prevent a partial selection on a line being deleted when using
CTRL-I to indent; also improve CTRL-Shift-I unindenting. Closes
#1557963.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/sciwrappers.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-09-21 09:55:50 UTC (rev 828)
+++ trunk/ChangeLog 2006-09-21 10:31:06 UTC (rev 829)
@@ -1,3 +1,13 @@
+2006-09-21 Nick Treleaven <nick.treleaven at btinternet.com>
+
+ * src/ui_utils.c:
+ Fix a bug when clicking on a recent file.
+ * src/callbacks.c src/sciwrappers.c:
+ Prevent a partial selection on a line being deleted when using
+ CTRL-I to indent; also improve CTRL-Shift-I unindenting. Closes
+ #1557963.
+
+
2006-09-20 Enrico Tröger <enrico.troeger at uvena.de>
* src/sci_cb.c: Don't start autocompletion in strings and comments.
@@ -12,8 +22,6 @@
Sort filenames passed to Grep alphabetically.
* src/socket.c:
Don't move Geany to the current desktop when opening files remotely.
- * src/ui_utils.c:
- Fix a bug when clicking on a recent file.
2006-09-18 Enrico Tröger <enrico.troeger at uvena.de>
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2006-09-21 09:55:50 UTC (rev 828)
+++ trunk/src/callbacks.c 2006-09-21 10:31:06 UTC (rev 829)
@@ -2498,7 +2498,7 @@
gint idx = document_get_cur_idx();
if (idx == -1 || ! doc_list[idx].is_valid) return;
- if (sci_can_copy(doc_list[idx].sci))
+ if (sci_get_lines_selected(doc_list[idx].sci) > 1)
{
sci_cmd(doc_list[idx].sci, SCI_TAB);
}
@@ -2524,7 +2524,7 @@
gint idx = document_get_cur_idx();
if (idx == -1 || ! doc_list[idx].is_valid) return;
- if (sci_can_copy(doc_list[idx].sci))
+ if (sci_get_lines_selected(doc_list[idx].sci) > 1)
{
sci_cmd(doc_list[idx].sci, SCI_BACKTAB);
}
Modified: trunk/src/sciwrappers.c
===================================================================
--- trunk/src/sciwrappers.c 2006-09-21 09:55:50 UTC (rev 828)
+++ trunk/src/sciwrappers.c 2006-09-21 10:31:06 UTC (rev 829)
@@ -818,7 +818,9 @@
}
}
-// get number of lines partially or fully selected
+/* Get number of lines partially or fully selected.
+ * Returns 1 if there is a partial selection on the same line.
+ * Returns 2 if a whole line is selected including the line break char(s). */
gint sci_get_lines_selected(ScintillaObject *sci)
{
gint start = SSM(sci, SCI_GETSELECTIONSTART, 0, 0);
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