Currently, if there is already text in the command line, that text is selected and the caret is placed at the end of the text when the command line gets focus with for example Shift+RigthtArrow or cm_FocusCmdLine or by clicking it with the mouse.
Often one have the need to insert, rather than append, text or filenames in the command line, and for that the current behavior is not always expedient. (If I want the file name appended by for example Ctrl+Enter placed in another position, I have to copy-paste is to the desidered place)
If TC could remember the last caret position when loosing focus, then that position could be used as the point of insertion when pressing Ctrl+Enter, Ctrl+Shift+Enter or Ctrl+P - or when the command line recieves focus.
Currently Shift+LeftArrow and Shift+RightArrow has the same function I imagine Shift+RightArrow could keep it's current behavior with selecting all text an placing the caret at the end of the text, but Shift+LeftArrow could put the caret at the saved position with no text selection.
The behavior could either be chosen via a setting like CommandlineInsertion=1 in wincmd.ini (preferable), or the commands cm_FocusCmdLine, cm_AddPathToCmdline, cm_AddFileNameToCmdline, and cm_AddPathAndFileNameToCmdline could all be provided with a parameter 1 which would use the remembered caret position.
This request is in line with this other request: https://ghisler.ch/board/viewtopic.php?p=437089#p437089
Option to remember the caret position in the command line
Moderators: Hacker, petermad, Stefan2, white
Option to remember the caret position in the command line
License #524 (1994)
Danish Total Commander Translator
TC 11.50b4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1383a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.50b4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1383a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Option to remember the caret position in the command line
+1
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Option to remember the caret position in the command line
All of this assumes that the cursor is blinking visible. Otherwise it is pointless and 'dangerous'. At present, this blinking visibility cannot be guaranteed with certainty within der Tc command line in all cases. Therefore the suggestion is uncertain and impractical.
Joube
Edit: - 1 removed
Joube
Edit: - 1 removed
Last edited by JOUBE on 2024-01-27, 13:50 UTC, edited 2 times in total.
Re: Option to remember the caret position in the command line
I don't see the problem - the cursor/caret is never visible anyway when the command line does not have focus, but the user should know, where he put it when the command line last had focus - also - I suggest to make it configurable.JOUBE wrote: ↑2024-01-27, 12:24 UTC All of this assumes that the cursor is blinking visible. Otherwise it is pointless and 'dangerous'. At present, this blinking visibility cannot be guaranteed with certainty within der Tc command line in all cases. Therefore the suggestion is uncertain and impractical.
License #524 (1994)
Danish Total Commander Translator
TC 11.50b4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1383a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.50b4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1383a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Option to remember the caret position in the command line
I will remove - 1. Because I don't care if it is possible to turn it off or not turn it on/use it.petermad wrote: ↑2024-01-27, 13:19 UTCI don't see the problem - the cursor/caret is never visible anyway when the command line does not have focus, but the user should know, where he put it when the command line last had focus - also - I suggest to make it configurable.JOUBE wrote: ↑2024-01-27, 12:24 UTC All of this assumes that the cursor is blinking visible. Otherwise it is pointless and 'dangerous'. At present, this blinking visibility cannot be guaranteed with certainty within der Tc command line in all cases. Therefore the suggestion is uncertain and impractical.
Re: Option to remember the caret position in the command line
100% support! It will be very useful.
The danger level is even lower than the current one, because it is more difficult to make a mistake when typing after restoring focus. In any case, the user sees the text before confirmation, so the danger here is conditional. This doesn't apply to the flashing of the text cursor, the presence of which depends on the version/settings of the system or the selected animation.
This is a completely meaningful, practical and expected behavior. And the most important thing is that it saves time.JOUBE wrote: ↑2024-01-27, 12:24 UTC All of this assumes that the cursor is blinking visible. Otherwise it is pointless and 'dangerous'. At present, this blinking visibility cannot be guaranteed with certainty within der Tc command line in all cases. Therefore the suggestion is uncertain and impractical.
The danger level is even lower than the current one, because it is more difficult to make a mistake when typing after restoring focus. In any case, the user sees the text before confirmation, so the danger here is conditional. This doesn't apply to the flashing of the text cursor, the presence of which depends on the version/settings of the system or the selected animation.
Overquoting is evil! 👎