SF.net SVN: geany:[4190] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Mon Sep 14 17:28:07 UTC 2009
Revision: 4190
http://geany.svn.sourceforge.net/geany/?rev=4190&view=rev
Author: ntrel
Date: 2009-09-14 17:28:07 +0000 (Mon, 14 Sep 2009)
Log Message:
-----------
Change snippet_goto_next_cursor() to
editor_goto_next_snippet_cursor() as it's in editor.h.
Avoid using GPOINTER_TO_INT macro.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
trunk/src/editor.h
trunk/src/keybindings.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-14 17:26:11 UTC (rev 4189)
+++ trunk/ChangeLog 2009-09-14 17:28:07 UTC (rev 4190)
@@ -16,6 +16,10 @@
Add dialogs_show_prompt() which also has an 'Apply' button.
* src/queue.c, src/queue.h:
Add warning that GeanyQueue may be removed.
+ * src/keybindings.c, src/editor.c, src/editor.h:
+ Change snippet_goto_next_cursor() to
+ editor_goto_next_snippet_cursor() as it's in editor.h.
+ Avoid using GPOINTER_TO_INT macro.
2009-09-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2009-09-14 17:26:11 UTC (rev 4189)
+++ trunk/src/editor.c 2009-09-14 17:28:07 UTC (rev 4190)
@@ -2166,17 +2166,20 @@
/* Move the cursor to the next specified cursor position in an inserted snippet.
* Can, and should, be optimized to give better results */
-void snippet_goto_next_cursor(ScintillaObject *sci, gint current_pos)
+void editor_goto_next_snippet_cursor(GeanyEditor *editor)
{
+ ScintillaObject *sci = editor->sci;
+ gint current_pos = sci_get_current_position(sci);
+
if (snippet_queue)
{
- gpointer offset;
+ gint offset;
- snippet_queue = queue_delete(snippet_queue, &offset, FALSE);
+ snippet_queue = queue_delete(snippet_queue, (gpointer*)&offset, FALSE);
if (current_pos > snippet_cursor_insert_pos)
- snippet_cursor_insert_pos = GPOINTER_TO_INT(offset) + current_pos;
+ snippet_cursor_insert_pos = offset + current_pos;
else
- snippet_cursor_insert_pos += GPOINTER_TO_INT(offset);
+ snippet_cursor_insert_pos += offset;
sci_set_current_position(sci, snippet_cursor_insert_pos, FALSE);
}
Modified: trunk/src/editor.h
===================================================================
--- trunk/src/editor.h 2009-09-14 17:26:11 UTC (rev 4189)
+++ trunk/src/editor.h 2009-09-14 17:28:07 UTC (rev 4190)
@@ -174,7 +174,7 @@
gboolean editor_start_auto_complete(GeanyEditor *editor, gint pos, gboolean force);
-void snippet_goto_next_cursor(ScintillaObject *sci, gint current_pos);
+void editor_goto_next_snippet_cursor(GeanyEditor *editor);
gboolean editor_complete_snippet(GeanyEditor *editor, gint pos);
Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2009-09-14 17:26:11 UTC (rev 4189)
+++ trunk/src/keybindings.c 2009-09-14 17:28:07 UTC (rev 4190)
@@ -1924,8 +1924,7 @@
duplicate_lines(doc->editor);
break;
case GEANY_KEYS_EDITOR_SNIPPETNEXTCURSOR:
- snippet_goto_next_cursor(doc->editor->sci,
- sci_get_current_position(doc->editor->sci));
+ editor_goto_next_snippet_cursor(doc->editor);
break;
case GEANY_KEYS_EDITOR_DELETELINE:
delete_lines(doc->editor);
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