! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Different behavior when closing a tab with middle click or the menu item
Status:
RESOLVED: FIXED
Product:
Xfce4-terminal
Component:
General

Comments

Description Far223 2019-07-07 19:52:57 CEST
Open a new window, then open two new tabs. The third tab is now selected. Switch to the first tab by clicking on it or pressing Ctrl+PageDown.

- close the first tab with the "Close Tab" menu item: the tab that was third is now selected
- close the first tab with a middle click on it: the tab that was second is now selected

I think the second behavior should happen all the time because it's predictable.

This probably happens because of the "Last Active Tab" menu item I suggested.

Thank you very much for your attention
Comment 1 Igor editbugs 2019-07-07 20:04:26 CEST
Hi, thanks for the report!

The intended behavior is to have the last active tab selected after you've closed the current one. This means that in your case the rightmost tab should be selected, as in your first pattern.

I've probably missed the close on middle click scenario; the behavior will be aligned to that of the "close tab" button and the menu item.
Comment 2 Far223 2019-07-07 20:12:51 CEST
Firefox selects the tab to the right after closing almost every time. Since this popular application (and earlier versions of xfce4-termimal) do this, maybe we could have an option to choose between the two (if you also want the behavior where the last active tab is selected).
Comment 3 Far223 2019-07-07 20:14:30 CEST
Now if you really want to select the last active tab, I'll get used to it :)
Comment 4 Igor editbugs 2019-07-07 20:21:06 CEST
Hmm, it seems you're right about Firefox.
I borrowed the idea from Chromium, however, - I find it really convenient to be brought back to the last active tab after closing the current one, instead of having to manually switch from some tab to my previous tab.
Comment 5 Git Bot editbugs 2019-07-07 20:30:54 CEST
Igor referenced this bugreport in commit 8c0bb6f0ad67bee1dea2d62b038fb5d05706cf21

Fix closing tab by middle click

https://git.xfce.org/apps/xfce4-terminal/commit?id=8c0bb6f0ad67bee1dea2d62b038fb5d05706cf21
Comment 6 Far223 2019-07-07 23:01:20 CEST
A quick thing totally unrelated: could you make the "Find..." menu item's keyboard shortcut (default ctrl+shift+f) work in the Find window? e.g. you change the opacity and then press ctrl+shift+f to quickly focus the search bar again
Comment 7 Igor editbugs 2019-07-07 23:12:44 CEST
(In reply to Far223 from comment #6)
> A quick thing totally unrelated: could you make the "Find..." menu item's
> keyboard shortcut (default ctrl+shift+f) work in the Find window? e.g. you
> change the opacity and then press ctrl+shift+f to quickly focus the search
> bar again
Good point!
I've made a change that prevents stealing focus from the text input field:
https://git.xfce.org/apps/xfce4-terminal/commit/?id=defbb5baf4723a5294f6fc04527925c0fa84995c
Comment 8 Far223 2019-07-08 08:42:50 CEST
The focus is still lost when checking one of the four boxes ("Case sensitive", etc), or clicking on the Next or Previous button, or even by doing [maintain click on a widget => move mouse away => release click]. So two options: just ctrl+shift+f (or user-set keyboard shortcut) to re-focus the bar, or making the search bar always focused.

Also, in the find window, the enter/return key does Previous instead of Next. I think dojng Next makes more sense.

I'm sorry for asking so many things about this search dialog :')
Comment 9 Far223 2019-07-08 11:06:41 CEST
And the last step to attain perfection would be to fill the search bar with the currently selected text when pressing ctrl(+shift)+f like in many programs.

I am only suggesting, do it only if you really want to, no one is going to complain if it's not there.
Comment 10 Igor editbugs 2019-07-21 18:04:49 CEST
(In reply to Far223 from comment #8)
> The focus is still lost when checking one of the four boxes ("Case
> sensitive", etc), or clicking on the Next or Previous button, or even by
> doing [maintain click on a widget => move mouse away => release click]. So
> two options: just ctrl+shift+f (or user-set keyboard shortcut) to re-focus
> the bar, or making the search bar always focused.
I'm not sure about that: if I make the checkboxes unfocusable (as I made the opacity bar), that would make them unusable without a mouse, i.e. you wouldn't be able to use the Tab key to cycle through the UI controls anymore.

I have to ask you this: what is your use case? Are you trying to improve mouse-less operation? In that case, you do know you can use Tab and Shift+Tab to switch between the controls within the dialog, right? I.e., even if the input field focus is lost, you can press (Shift+)Tab a few times and get the focus back.

> Also, in the find window, the enter/return key does Previous instead of
> Next. I think dojng Next makes more sense.
I think "Previous" makes sense as you'd normally search from the bottom of the scrollback which means that all contents would be above the current position.

> I'm sorry for asking so many things about this search dialog :')
That's all right ;)
Comment 11 Igor editbugs 2019-07-21 18:07:52 CEST
(In reply to Far223 from comment #9)
> And the last step to attain perfection would be to fill the search bar with
> the currently selected text when pressing ctrl(+shift)+f like in many
> programs.
> 
> I am only suggesting, do it only if you really want to, no one is going to
> complain if it's not there.
I'm not sure about that, either.
What if multiple lines are selected? Do we want to put the entire contents into the input field? Or trim it? to how many characters? paste the beginning or the end of the selection?
How do we want to handle line breaks? replace them with spaces? or only paste the contents before the first line break?
Comment 12 Far223 2019-08-02 08:47:43 CEST
You are right, the boxes of the search dialog should be reachable with (shift +) tab.
I think the opacity scale should be focusable as well because it can be controlled with the arrow keys (https://git.xfce.org/apps/xfce4-terminal/commit/?id=defbb5baf4723a5294f6fc04527925c0fa84995c).
I think ctrl+shift+f should work in the search dialog instead.

As for putting the selection in the search field, only the contents before the first line break should be pasted because it wouldn't match itself otherwise. In xfce4-terminal, the number of bytes allowed in a search string is 32,764, so I guess that would be the limit.

Bug #15687

Reported by:
Far223
Reported on: 2019-07-07
Last modified on: 2019-08-02

People

CC List:
0 users

Version

Attachments

Additional information