[anjuta-extras] scintilla: Fix behavior of Scintilla to match GtkSourceView
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta-extras] scintilla: Fix behavior of Scintilla to match GtkSourceView
- Date: Sat, 23 Feb 2013 17:48:30 +0000 (UTC)
commit ea98bd565f06294ed8adc6d691dabec0f3d1161e
Author: Sébastien Granjoux <seb sfo free fr>
Date: Sat Feb 23 18:45:36 2013 +0100
scintilla: Fix behavior of Scintilla to match GtkSourceView
Due to these difference, the search was not working correctly
plugins/scintilla/text_editor.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/scintilla/text_editor.c b/plugins/scintilla/text_editor.c
index b37d0dc..1fbea06 100644
--- a/plugins/scintilla/text_editor.c
+++ b/plugins/scintilla/text_editor.c
@@ -2866,8 +2866,9 @@ iselection_set (IAnjutaEditorSelection* edit,
int start_pos = text_editor_cell_get_position (start);
int end_pos = text_editor_cell_get_position (end);
+ /* Keep current position at the beginning of the selection like GtkSourceView */
scintilla_send_message (SCINTILLA (TEXT_EDITOR (edit)->scintilla),
- SCI_SETSEL, start_pos, end_pos);
+ SCI_SETSEL, end_pos, start_pos);
}
static gboolean
@@ -3917,8 +3918,8 @@ isearch_backward (IAnjutaEditorSearch* isearch,
GError** e)
{
TextEditor *te = TEXT_EDITOR (isearch);
- gint end = text_editor_cell_get_position (TEXT_EDITOR_CELL (istart));
- gint start = text_editor_cell_get_position (TEXT_EDITOR_CELL (iend));
+ gint end = text_editor_cell_get_position (TEXT_EDITOR_CELL (iend));
+ gint start = text_editor_cell_get_position (TEXT_EDITOR_CELL (istart));
gint flags = 0;
gint retval;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]