Problems with text scrolling when the INI file has the CtrlArrow=1
Moderators: Hacker, petermad, Stefan2, white
Problems with text scrolling when the INI file has the CtrlArrow=1
I have this bug when the wincmd.ini file has the CtrlArrow=1 in the [Configuration] section.
Problem:
When renaming a long file name or a long folder name in the file panel (Shift+F6 or double LBM) or editing a long path in the panel header, the length of the name does not fit into the width of the columns and TC in the panel adds ".." to the name, when selecting text from right to left (by Shift+left or Ctrl+Shift+left) the cursor with the selection reaches the left border of the TC window, but no further scrolling of the text occurs. The cursor is not visible, the cursor seems to go beyond the window selecting the text (in accordance with the selection method Shift or Ctrl+Shift), but the selected text of the file or folder name is not displayed.
At the same time, selecting and scrolling text only with LBM left and right or moving the cursor with Ctrl+left occurs correctly.
At the same time, in other TC text fields: in the command line (Ctrl+Shift+Enter), in the copy or move dialog boxes (F5, Shift+F5, F6) text scrolling when selecting text of a long path with a file name, there are no such problems.
If you specify the key parameter CtrlArrow=0, then there are no such problems, the cursor is visible when selecting text and the text scrolling occurs correctly.
The bug is associated exclusively with the key parameter CtrlArrow=1 and the processing of key combinations Shift+left, Ctrl+Shift+left and only in a small edit field in the panel.
This is repeated on pure Total Commander both versions x32 and x64, all versions from 11.00 to 11.50b6 (including all beta and all RC versions).
My OS is Windows 7 x64.
Problem:
When renaming a long file name or a long folder name in the file panel (Shift+F6 or double LBM) or editing a long path in the panel header, the length of the name does not fit into the width of the columns and TC in the panel adds ".." to the name, when selecting text from right to left (by Shift+left or Ctrl+Shift+left) the cursor with the selection reaches the left border of the TC window, but no further scrolling of the text occurs. The cursor is not visible, the cursor seems to go beyond the window selecting the text (in accordance with the selection method Shift or Ctrl+Shift), but the selected text of the file or folder name is not displayed.
At the same time, selecting and scrolling text only with LBM left and right or moving the cursor with Ctrl+left occurs correctly.
At the same time, in other TC text fields: in the command line (Ctrl+Shift+Enter), in the copy or move dialog boxes (F5, Shift+F5, F6) text scrolling when selecting text of a long path with a file name, there are no such problems.
If you specify the key parameter CtrlArrow=0, then there are no such problems, the cursor is visible when selecting text and the text scrolling occurs correctly.
The bug is associated exclusively with the key parameter CtrlArrow=1 and the processing of key combinations Shift+left, Ctrl+Shift+left and only in a small edit field in the panel.
This is repeated on pure Total Commander both versions x32 and x64, all versions from 11.00 to 11.50b6 (including all beta and all RC versions).
My OS is Windows 7 x64.
- ghisler(Author)
- Site Admin
- Posts: 50824
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Problems with text scrolling when the INI file has the CtrlArrow=1
Confirmed, only when scrolling left with Shift+Left arrow.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50824
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Problems with text scrolling when the INI file has the CtrlArrow=1
Unfortunately this problem cannot be fixed, or only partially: The caret (text cursor) position is set with the same function EM_SETSEL as the selection. Unfortunately EM_SETSEL always places the caret at the END of the selection, and Windows always scrolls the caret into view. You can find the discussion here:
https://ghisler.ch/board/viewtopic.php?t=78869
When using Shift+Left, I can scroll the left side into view by calling EM_SETSEL with just the left position of the selection, and then EM_SETSEL with the entire selection. But if this entire selection is longer than the edit box (e.g. when you select from the end of the name), Windows will automatically scroll the end of the selection into view.
https://ghisler.ch/board/viewtopic.php?t=78869
When using Shift+Left, I can scroll the left side into view by calling EM_SETSEL with just the left position of the selection, and then EM_SETSEL with the entire selection. But if this entire selection is longer than the edit box (e.g. when you select from the end of the name), Windows will automatically scroll the end of the selection into view.
Moderator message from: ghisler(Author) » 2024-11-18, 09:56 UTC
Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Problems with text scrolling when the INI file has the CtrlArrow=1
Dear Christian Ghisler.ghisler(Author) wrote: 2024-11-17, 09:25 UTC Confirmed, only when scrolling left with Shift+Left arrow.
I have this problem with both Shift+Left arrow and Ctrl+Shift+Left arrow.
Why is there no problem with text scrolling if the option is set to CtrlArrow=0?ghisler(Author) wrote: 2024-11-18, 09:56 UTC When using Shift+Left, I can scroll the left side into view by calling EM_SETSEL with just the left position of the selection, and then EM_SETSEL with the entire selection. But if this entire selection is longer than the edit box (e.g. when you select from the end of the name), Windows will automatically scroll the end of the selection into view.
Why does adding additional non-alphanumeric characters and enabling them with the CtrlArrow=1 option result in incorrect handling of the cursor position and no text scrolling only when editing a file name in the file panel?
At the same time, similar actions in a separate copy or move window (F5, Shift+F5, F6) or in the command line are handled correctly.
Why does this happen so selectively?
- ghisler(Author)
- Site Admin
- Posts: 50824
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Problems with text scrolling when the INI file has the CtrlArrow=1
Then the edit control itself sets both the selection and the cursor position.Why is there no problem with text scrolling if the option is set to CtrlArrow=0?
With CtrlArrow=1, Total Commander has to do both. But setting the selection ALWAYS sets the cursor to the END of the selection.
It also happens with normal alphabetic characters, the name just needs to be longer than the available space.Why does adding additional non-alphanumeric characters and enabling them with the CtrlArrow=1 option result in incorrect handling
They don't use CtrlArrow=1.At the same time, similar actions in a separate copy or move window (F5, Shift+F5, F6) or in the command line are handled correctly.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Problems with text scrolling when the INI file has the CtrlArrow=1
Now everything is clear.
Thanks for the answer.
Thanks for the answer.