Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document location moves to cursor location on save #1590

Open
ITwrx opened this issue Aug 28, 2017 · 22 comments
Open

document location moves to cursor location on save #1590

ITwrx opened this issue Aug 28, 2017 · 22 comments
Labels
can't reproduce A developer couldn't reproduce the issue

Comments

@ITwrx
Copy link

ITwrx commented Aug 28, 2017

geany-gtk3 1.29-1
geany-plugins-gtk3 1.29-2
geany-themes 1.24-1
arch linux

when manually saving a document, or when geany is set to autosave and does so, geany moves focus/document scroll location to last/current cursor location instead of maintaining current scroll location.

This means that when you are working on a long document and have scrolled up to examine something 300 lines up from last cursor location, geany will autosave and move document scroll location down 300 lines making it difficult to even know where you are sometimes. It can also make you forget what you were trying to do as the code in view may be the reminder. It took me a minute to even figure out what geany was doing when this kept happening.

It would be nice if geany would either leave focus alone when saving or remember where i was in a document instead of forcibly moving me to the cursor location. :)

thanks

@codebrainz
Copy link
Member

Geany doesn't autosave, and it keeps the scroll position when saving, it sounds likely that this is a bug with a plugin you are using, possibly the one doing the auto-saving. You can test by launching Geany with geany -p to disable any plugins, and then try it again.

@ITwrx
Copy link
Author

ITwrx commented Aug 28, 2017

i see that it is a plugin that is responsible for the autosave but i disabled autosave, then started geany with plugins disabled as you described and it still exhibits the same behavior. when you save, it repositions to the cursor location.

@elextr
Copy link
Member

elextr commented Aug 29, 2017

Doesn't move the scroll position here when using any of menu, keybinding or toolbar to initiate the save. Need exact steps to reproduce

@elextr elextr added the can't reproduce A developer couldn't reproduce the issue label Aug 29, 2017
@ITwrx
Copy link
Author

ITwrx commented Aug 29, 2017

are you using the same version of geany as i am? btw, i'm using gnome DE (gnome-shell 3.24.3-1).

also, i just noticed this:
(geany:7960): Gdk-CRITICAL **: xdg_popup_configure: assertion 'impl->transient_for' failed Gdk-Message: Window 0xdd39340 is a temporary window without parent, application will not be able to position it on screen. Gdk-Message: Window 0xdd39340 is a temporary window without parent, application will not be able to position it on screen.

i make a change in a php file, scroll up enough to where the cursor is not in current view in scroll position. save file using the toolbar and geany scrolls to where the cursor is back in view, losing my previously chosen scroll position.

@elextr
Copy link
Member

elextr commented Aug 29, 2017

Tested with 1.31 on Mint Cinnamon GTK 3.18.9, GLib 2.48.2.

What versions of Glib and GTK are you using (menu->help->debug messages)?

I don't see the critical messages, don't know if thats the cause of the scroll but since Arch is probably bleeding edge of GTK it may be due to bugs in that.

@ITwrx
Copy link
Author

ITwrx commented Aug 29, 2017

gtk3 3.22.18-2
glib2 2.52.3-1

geany debug reports:
18:26:02: Gdk CRITICAL : xdg_popup_configure: assertion 'impl->transient_for' failed 18:26:09: Gdk CRITICAL : xdg_popup_configure: assertion 'impl->transient_for' failed

@elextr
Copy link
Member

elextr commented Aug 29, 2017

Those messages are GTK internal messages (from Gdk that underlys GTK). I am not sure how it would affect the save scrolling, can you check if they have occurred prior to starting the offending save or if they occur during the save.

@ITwrx
Copy link
Author

ITwrx commented Aug 29, 2017

i just saved twice without those Gdk/GTK errors appearing, so i guess that was irrelevent. i just upgraded to geany-gtk3 1.31.1 and started with "geany -p" but the behavior persists.

I also notice that it always moves the scroll position to where the cursor is the bottom line of the new scroll position/view. This behavior is also completely consistent.

@elextr
Copy link
Member

elextr commented Aug 29, 2017

Can't reproduce it here, may be some setting you have different, can you post a gist of your user config? (do check for personal info first :)

@codebrainz
Copy link
Member

@ITwrx what window manager are you using? Also you're using X not Wayland, right?

@ITwrx
Copy link
Author

ITwrx commented Aug 29, 2017

i'm using gnome DE (gnome-shell 3.24.3-1) with wayland

@ITwrx
Copy link
Author

ITwrx commented Aug 29, 2017

@elextr i don't know what you're asking for with "can you post a gist of your user config".

@codebrainz
Copy link
Member

codebrainz commented Aug 30, 2017

@ITwrx it's probably an incompatibility with Wayland, I don't think many (any) body is using that. Are you able to startx and try and reproduce in X11? Those warning message's you're getting are related to the window/desktop managerwindow manager/server.

@elextr i don't know what you're asking for with "can you post a gist of your user config".

He means to pastebin the file ~/.config/geany/geany.conf. It contains filenames, which may include your username or such (ex. recent file /home/you/topsecret/hitlist.txt).

@elextr
Copy link
Member

elextr commented Aug 30, 2017

@codebrainz whilst it indeed may be an incompatibility with wayland, the messages do not occur at the time the screen scrolls, so they probably are not related.

The behaviour looks suspiciously like something calls the scintilla "scroll cursor visible" call so I want to see what settings @ITwrx has that relate to the changes Geany makes at save time, maybe some combination causes a scroll, but there are too many to just ramdomly try them all.

@ITwrx yes @codebrainz described what I am after correctly. As well as the filenames the file may contain personal details in the template data (depending on what you have set) so I thought it worthwhile to warn you. Just copy the file and delete lines you don't want us to see before you post it.

@ITwrx
Copy link
Author

ITwrx commented Aug 30, 2017

@codebrainz wayland is the default in arch with gnome/gdm. so, IOW, everybody! :) i've got some things running in the terminal from remote machines so it may be a little while before i can bring myself to kill them long enough to try X.

@elextr pls see https://pastebin.com/7iF1EbWi

@elextr
Copy link
Member

elextr commented Aug 30, 2017

@ITwrx Wayland is the default for Arch, but its still Arch, so IOW, nobody. 😉 The Geany devs and most of the contributors use stable distros.

The only settings that are different on your system make no difference here, so I guess its back to @codebrainz theory that its something weird Wayland does or some change in the bleeding edge version of GTK behaviour. No rush, let us know when you get a chance to try X.

@evgeni
Copy link

evgeni commented Aug 30, 2017

Fedora 26 here, running Wayland, and I can't reproduce the issue.

  • Geany 1.31
  • GTK 3.22.19
  • GLib 2.52.3

Opening a long file, doing some changes here and there. Pressing ^s. Neither my cursor nor the scrolling moves anywhere.

@sardemff7
Copy link
Contributor

sardemff7 commented Aug 30, 2017

Could you both run WAYLAND_DEBUG=client geany and pastebin the output please? Make it as quick as possible because it’ll be quite verbose. And shut Geany down right after you save.

@sardemff7
Copy link
Contributor

Oh, and please try to reproduce with Weston (at least 1.12).

@evgeni
Copy link

evgeni commented Aug 30, 2017

For me it was WAYLAND_DEBUG=1 that triggered the behavior you wanted.

geany.txt

@ITwrx
Copy link
Author

ITwrx commented Aug 30, 2017

i can't replicate this issue on my laptop which is a largely identical setup with either geany or geany-gtk3. these packages are the same on either laptop or desktop.

glib2 2.52.3-1
gnome-shell 3.24.3-1
gtk2 2.24.31-1
gtk3 3.22.19-2
wayland 1.14.0-1
wayland-protocols 1.10-1

On desktop both geany and geany-gtk3 exhibit the reported behavior. pls see geany-wayland-debug from desktop machine: https://pastebin.com/70p3UmWw
thanks

@sardemff7
Copy link
Contributor

So it seems to be a bug if 3.22.18 that was fixed in 3.22.19. From their git log, I see nothing obviously obvious though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't reproduce A developer couldn't reproduce the issue
Projects
None yet
Development

No branches or pull requests

5 participants