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

Line breaking and rectangular selection #2051

Closed
elextr opened this issue Jan 17, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@elextr
Copy link
Member

commented Jan 17, 2019

When typing in a rectangular selection (ie on a vertical column of lines) hits the break column the last line is broken and the vertical selection is destroyed so further typing only happens on that last line.

Until Geany supports discontiguous multiple selections its not possible to continue the multiple typing if all lines are wrapped, so probably best for line breaking to check for multiple selections and not do the break so the users typing continues on all the lines, then they can break manually.

@elextr

This comment has been minimized.

Copy link
Member Author

commented Jan 27, 2019

Update, sometimes Geany crashes when typing in a rectangular selection passes the line breaking position (and breaking is on of course).

Some of the backtrace . Its clearly in a loop and I got bored typing return.

It doesn't crash every time, other times it behaves as described in the OP.

09:37:23: Geany INFO		: Using alternate configuration directory
09:37:23: Geany INFO		: Geany 1.35 (git >= 4452b36), en_AU.UTF-8
09:37:23: Geany INFO		: GTK 3.18.9, GLib 2.48.2

Empty config that doesn't exist so no plugins and default settings except Document->Line breaking of course.

Looks like it loops through editor.c:check_line_breaking() inserting a newline causing a changed notification from Scintilla causing a call to check_line_breaking() etc. But I can't see why it only crashes sometimes @b4n?

@elextr elextr added the bug label Jan 27, 2019

@elextr elextr added this to the 1.35 milestone Jan 27, 2019

@elextr elextr added the crash label Jan 27, 2019

b4n added a commit to b4n/geany that referenced this issue Feb 5, 2019

Don't perform line breaking in rectangular selection mode
Doing so drops the rectangular selection, and there is no obvious
correct behavior for line breaking with a rectangular selection.
So, just don't do line breaking in this case.

Fixes geany#2051.

@b4n b4n self-assigned this Apr 27, 2019

@elextr elextr closed this in #2135 Apr 27, 2019

elextr added a commit that referenced this issue Apr 27, 2019

Don't perform line breaking in rectangular selection mode (#2135)
Doing so drops the rectangular selection, and there is no obvious
correct behavior for line breaking with a rectangular selection.
So, just don't do line breaking in this case.

Fixes #2051.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.