SF.net SVN: geany:[4317] trunk/src/editor.c
ntrel at users.sourceforge.net
ntrel at xxxxx
Wed Oct 14 14:29:08 UTC 2009
Revision: 4317
http://geany.svn.sourceforge.net/geany/?rev=4317&view=rev
Author: ntrel
Date: 2009-10-14 14:29:05 +0000 (Wed, 14 Oct 2009)
Log Message:
-----------
Remove unnecessary CalltipReshowInfo struct - as the calltip reshowing is delayed, autocompletion has already worked normally.
Modified Paths:
--------------
trunk/src/editor.c
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2009-10-14 14:13:24 UTC (rev 4316)
+++ trunk/src/editor.c 2009-10-14 14:29:05 UTC (rev 4317)
@@ -488,17 +488,8 @@
}
-typedef struct
-{
- gint message;
- gint pos;
- gchar *text;
-} CalltipReshowInfo;
-
-
static gboolean reshow_calltip(gpointer data)
{
- CalltipReshowInfo *cri = data;
GeanyDocument *doc;
g_return_val_if_fail(calltip.sci != NULL, FALSE);
@@ -511,22 +502,7 @@
/* we use the position where the calltip was previously started as SCI_GETCURRENTPOS
* may be completely wrong in case the user cancelled the auto completion with the mouse */
SSM(calltip.sci, SCI_CALLTIPSHOW, calltip.pos, (sptr_t) calltip.text);
-
- /* now autocompletion has been cancelled by SCI_CALLTIPSHOW, so do it manually */
- if (cri->message == SCN_AUTOCSELECTION)
- {
- gint pos = SSM(calltip.sci, SCI_GETCURRENTPOS, 0, 0);
-
- sci_set_selection_start(calltip.sci, cri->pos);
- sci_set_selection_end(calltip.sci, pos);
- sci_replace_sel(calltip.sci, ""); /* clear root of word */
- sci_insert_text(calltip.sci, cri->pos, cri->text);
- sci_goto_pos(calltip.sci, cri->pos + strlen(cri->text), FALSE);
- }
}
- g_free(cri->text);
- g_free(cri);
-
return FALSE;
}
@@ -535,13 +511,9 @@
{
if (calltip.set)
{
- CalltipReshowInfo *cri = g_new0(CalltipReshowInfo, 1);
- cri->message = nt->nmhdr.code;
- cri->message = nt->lParam;
- cri->text = g_strdup(nt->text);
/* delay the reshow of the calltip window to make sure it is actually displayed,
* without it might be not visible on SCN_AUTOCCANCEL */
- g_idle_add(reshow_calltip, cri);
+ g_idle_add(reshow_calltip, NULL);
}
}
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