Fix hidden lines after deleting a line that is a collapsed fold
point. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2175 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
f446def461
commit
62c0ad1493
@ -1,3 +1,10 @@
|
|||||||
|
2008-01-16 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
|
|
||||||
|
* src/editor.c:
|
||||||
|
Fix hidden lines after deleting a line that is a collapsed fold
|
||||||
|
point.
|
||||||
|
|
||||||
|
|
||||||
2008-01-15 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
2008-01-15 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
|
|
||||||
* src/dialogs.c:
|
* src/dialogs.c:
|
||||||
|
19
src/editor.c
19
src/editor.c
@ -266,6 +266,20 @@ static void on_char_added(gint idx, SCNotification *nt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void ensure_range_visible(ScintillaObject *sci, gint posStart, gint posEnd,
|
||||||
|
gboolean enforcePolicy)
|
||||||
|
{
|
||||||
|
gint lineStart = SSM(sci, SCI_LINEFROMPOSITION, MIN(posStart, posEnd), 0);
|
||||||
|
gint lineEnd = SSM(sci, SCI_LINEFROMPOSITION, MAX(posStart, posEnd), 0);
|
||||||
|
gint line;
|
||||||
|
|
||||||
|
for (line = lineStart; line <= lineEnd; line++)
|
||||||
|
{
|
||||||
|
SSM(sci, enforcePolicy ? SCI_ENSUREVISIBLEENFORCEPOLICY : SCI_ENSUREVISIBLE, line, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// callback func called by all editors when a signal arises
|
// callback func called by all editors when a signal arises
|
||||||
void on_editor_notification(GtkWidget *editor, gint scn, gpointer lscn, gpointer user_data)
|
void on_editor_notification(GtkWidget *editor, gint scn, gpointer lscn, gpointer user_data)
|
||||||
{
|
{
|
||||||
@ -357,6 +371,11 @@ void on_editor_notification(GtkWidget *editor, gint scn, gpointer lscn, gpointer
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
case SCN_NEEDSHOWN:
|
||||||
|
{
|
||||||
|
ensure_range_visible(sci, nt->position, nt->position + nt->length, FALSE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case SCN_URIDROPPED:
|
case SCN_URIDROPPED:
|
||||||
{
|
{
|
||||||
if (nt->text != NULL)
|
if (nt->text != NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user