SF.net SVN: geany:[3800] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Mon May 18 14:51:37 UTC 2009
Revision: 3800
http://geany.svn.sourceforge.net/geany/?rev=3800&view=rev
Author: ntrel
Date: 2009-05-18 14:51:37 +0000 (Mon, 18 May 2009)
Log Message:
-----------
Add sci_set_selection().
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
trunk/src/sciwrappers.c
trunk/src/sciwrappers.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-17 17:49:18 UTC (rev 3799)
+++ trunk/ChangeLog 2009-05-18 14:51:37 UTC (rev 3800)
@@ -1,3 +1,9 @@
+2009-05-18 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/sciwrappers.c, src/sciwrappers.h, src/editor.c:
+ Add sci_set_selection().
+
+
2009-05-17 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* tagmanager/python.c:
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2009-05-17 17:49:18 UTC (rev 3799)
+++ trunk/src/editor.c 2009-05-18 14:51:37 UTC (rev 3800)
@@ -2163,7 +2163,7 @@
sci_replace_sel(sci, to_insert);
if (ch == '>')
{
- SSM(sci, SCI_SETSEL, pos, pos);
+ sci_set_selection(sci, pos, pos);
if (utils_str_equal(tag_name, "table"))
auto_table(editor, pos);
}
@@ -2495,7 +2495,7 @@
continue;
}
- SSM(editor->sci, SCI_SETSEL, line_start + x, line_start + x + co_len);
+ sci_set_selection(editor->sci, line_start + x, line_start + x + co_len);
sci_replace_sel(editor->sci, "");
count++;
}
@@ -3387,7 +3387,7 @@
return;
}
- SSM(editor->sci, SCI_SETSEL, start, end);
+ sci_set_selection(editor->sci, start, end);
}
@@ -3414,7 +3414,7 @@
line = sci_get_line_from_position(editor->sci, end);
end = sci_get_position_from_line(editor->sci, line + 1);
- SSM(editor->sci, SCI_SETSEL, start, end);
+ sci_set_selection(editor->sci, start, end);
}
@@ -3490,7 +3490,7 @@
line_found = find_paragraph_stop(editor, line_start, DOWN);
pos_end = SSM(editor->sci, SCI_POSITIONFROMLINE, line_found, 0);
- SSM(editor->sci, SCI_SETSEL, pos_start, pos_end);
+ sci_set_selection(editor->sci, pos_start, pos_end);
}
@@ -3515,7 +3515,7 @@
sel_end = SSM(editor->sci, SCI_GETLINEINDENTPOSITION, i, 0);
if (sel_start < sel_end)
{
- SSM(editor->sci, SCI_SETSEL, sel_start, sel_end);
+ sci_set_selection(editor->sci, sel_start, sel_end);
sci_replace_sel(editor->sci, "");
}
sci_insert_text(editor->sci, sel_start, indent);
@@ -3601,7 +3601,7 @@
if (sci_get_char_at(editor->sci, indentation_end) == ' ')
{
- SSM(editor->sci, SCI_SETSEL, indentation_end, indentation_end + 1);
+ sci_set_selection(editor->sci, indentation_end, indentation_end + 1);
sci_replace_sel(editor->sci, "");
count--;
if (i == first_line)
Modified: trunk/src/sciwrappers.c
===================================================================
--- trunk/src/sciwrappers.c 2009-05-17 17:49:18 UTC (rev 3799)
+++ trunk/src/sciwrappers.c 2009-05-18 14:51:37 UTC (rev 3800)
@@ -400,6 +400,12 @@
}
+void sci_set_selection(ScintillaObject *sci, gint anchorPos, gint currentPos)
+{
+ SSM(sci, SCI_SETSEL, anchorPos, currentPos);
+}
+
+
gint sci_get_line_end_position(ScintillaObject* sci, gint line)
{
return SSM(sci, SCI_GETLINEENDPOSITION, line, 0);
Modified: trunk/src/sciwrappers.h
===================================================================
--- trunk/src/sciwrappers.h 2009-05-17 17:49:18 UTC (rev 3799)
+++ trunk/src/sciwrappers.h 2009-05-18 14:51:37 UTC (rev 3800)
@@ -78,6 +78,7 @@
gint sci_get_pos_at_line_sel_end (ScintillaObject* sci, gint line);
void sci_set_selection_start (ScintillaObject* sci, gint position);
void sci_set_selection_end (ScintillaObject* sci, gint position);
+void sci_set_selection (ScintillaObject *sci, gint anchorPos, gint currentPos);
gint sci_get_length (ScintillaObject* sci);
void sci_get_text (ScintillaObject* sci,gint len,gchar* text);
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