Please consider making it possible to temporarily hide one or more lines from
the display For example one might select a block of whole lines by dragging in the line numbers column and then marking this block as temporarily not visible - perhaps with a horizontal line in the line numbers column which when touched would make the block visible again The advantage of this over code folding is that it does not depend on the syntactic structure of the text being editted <b>Thanks!</b>
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/801
The selection of lines by dragging in the numbers column is very useful Please
consider making it possible to have several such selections active at the same
time so that all the selected data can be operated on by a single change
selection<b>Thanks!</b>
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/799
@codebrainz S/B a separate issue, but yeah showing Geany with "Loading Session Files..." would be better.
@techee looks sensible to me.
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/576#issuecomment-164196442
We should also show the main window before loading any files. It's better to have Geany show and then freeze/lockup than to have nothing happen when the user clicks the Geany icon. I experienced this a few times while testing that really slow Java file, I thought Geany was crashing on startup or something, but it was just that the really slow file was in session history. About 5 minutes passed before any sign of Geany running appeared.
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/576#issuecomment-164194954
@b4n Any opinion on this one? The reason I'm asking is that as I was playing with the big files and testing Geany performance now, I triggered this quite frequently and actually in a non-cosmetic way.
It seems that when opening Geany takes longer because e.g. a bigger file has to be parsed, the redraw to the correct size gets somehow skipped and Geany gets into a strange state where it's drawn with the sizes from Glade and is kind of frozen (clicking inside editor doesn't work, menus don't react etc.). It only helps if I click to another editor tab after which Geany gets redrawn and starts working normally.
This strange behavior doesn't happen if the correct sizes are applied before the initial show().
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/576#issuecomment-164171441
>
> I just tried the patch and it doesn't seem to work for me, if I change a
> type name other occurrences of it don't change:
>
> typedef int bar;
>
> bar z;
>
> if you change the name of the typedef, the typedef itself gets
> re-highlighted when the cursor blinks (roughly a second later), but the
> usage below don't.
>
OK, right - the color would get updated only after you start typing.
> However, instead of re-colorizing everything maybe we could only colorize
> up to the end of the visible area, which would mitigate (or even
> eradicate?) the slowness:
>
> diff --git a/src/editor.c b/src/editor.c
> index 1336588..cfbfbe9 100644--- a/src/editor.c+++ b/src/editor.c@@ -4682,12 +4682,20 @@ on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_d
> static gboolean editor_check_colourise(GeanyEditor *editor)
> {
> GeanyDocument *doc = editor->document;+ gint start_line, end_line, start, end;
>
> if (!doc->priv->colourise_needed)
> return FALSE;
> + start_line = SSM(editor->sci, SCI_GETFIRSTVISIBLELINE, 0, 0);+ end_line = start_line + SSM(editor->sci, SCI_LINESONSCREEN, 0, 0);+ start_line = SSM(editor->sci, SCI_DOCLINEFROMVISIBLE, start_line, 0);+ end_line = SSM(editor->sci, SCI_DOCLINEFROMVISIBLE, end_line, 0);+ start = sci_get_position_from_line(editor->sci, start_line);+ end = sci_get_line_end_position(editor->sci, end_line);+
> doc->priv->colourise_needed = FALSE;- sci_colourise(editor->sci, 0, -1);+ sci_colourise(editor->sci, start, end);
>
> /* now that the current document is colourised, fold points are now accurate,
> * so force an update of the current function/tag. */
>
>
> This is insufficient because when the document gets loaded, we need to
perform the whole-document colorization otherwise we won't get valid fold
points ("fold all" doesn't work as expected with your patch).
Anyway, we can have two types of colorization - full, performed on document
load, and partial (the one from your patch), performed only to recolorize
typenames (they won't modify fold points in any way so it should be safe).
I've updated the patch with this and it seems to work well.
(The updated patch still fixes the performance problem - the visible area
colorization appears to be cheap.)
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/575#issuecomment-164157945
@elextr what do you mean? if someone wants accurate style/fold info on some possibly invisible area, one has to ask for it using [`SCI_COLOURISE`](http://www.scintilla.org/ScintillaDoc.html#SCI_COLOURISE), just like the code @techee wants to get rid of does. Neither Scintilla nor us ever guaranteed everything was always styled, and it probably often isn't (typically it's not in the notification when you just entered a character).
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/575#issuecomment-164041597
I just tried the patch and it doesn't seem to work for me, if I change a type name other occurrences of it don't change:
```C
typedef int bar;
bar z;
```
if you change the name of the typedef, the typedef itself gets re-highlighted when the cursor blinks (roughly a second later), but the usage below don't.
However, instead of re-colorizing everything maybe we could only colorize up to the end of the visible area, which would mitigate (or even eradicate?) the slowness:
```diff
diff --git a/src/editor.c b/src/editor.c
index 1336588..cfbfbe9 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -4682,12 +4682,20 @@ on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_d
static gboolean editor_check_colourise(GeanyEditor *editor)
{
GeanyDocument *doc = editor->document;
+ gint start_line, end_line, start, end;
if (!doc->priv->colourise_needed)
return FALSE;
+ start_line = SSM(editor->sci, SCI_GETFIRSTVISIBLELINE, 0, 0);
+ end_line = start_line + SSM(editor->sci, SCI_LINESONSCREEN, 0, 0);
+ start_line = SSM(editor->sci, SCI_DOCLINEFROMVISIBLE, start_line, 0);
+ end_line = SSM(editor->sci, SCI_DOCLINEFROMVISIBLE, end_line, 0);
+ start = sci_get_position_from_line(editor->sci, start_line);
+ end = sci_get_line_end_position(editor->sci, end_line);
+
doc->priv->colourise_needed = FALSE;
- sci_colourise(editor->sci, 0, -1);
+ sci_colourise(editor->sci, start, end);
/* now that the current document is colourised, fold points are now accurate,
* so force an update of the current function/tag. */
```
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/575#issuecomment-164031773