[Feature] Undo for the Editor

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
DärJohannes
Junior Member
Junior Member
Posts: 11
Joined: 2011-07-29, 07:22 UTC

[Feature] Undo for the Editor

Post by *DärJohannes »

I am missing an Undo function in the TC editor.

Yesterday, I wrote a long text in Total Commander's editor and after finishing the text, when I wanted to copy and paste it to somewhere else, I accidentally chose "Paste" first (not copy) and thereby replaced the whole text by the contents of the clipboard.

An Undo function in Total Commander's editor would have been exactly what I needed to fix that mistake.
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Simple Undo in Editor is implemented in latest TC betas, but currently only for Android 6 and newer (I don't know whether it is planned or even possible to add it for previous Android versions). So if you have a compatible Android device, you can try it with current TC4A 2.81 beta 10 (Google Play/APK)
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It only support on Android 6 and newer because that's when Google added it to their edit control.
Author of Total Commander
https://www.ghisler.com
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

How can we activate this function? I don't find it and I'm on Androïd 7.1.

Thank you :D .

Ok, I've found it on another post :wink: .
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

sjlouis wrote:Ok, I've found it on another post :wink: .
And how about posting the URL to that post or the solution itself?

Taking and Giving, you know?




 
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

It's in this post :
viewtopic.php?t=49670
ghisler(Author) wrote:Unfortunately Undo is very limited in the Android edit control: It is only available after
- typing
- pasting text
- deleting text
and it can only undo a single step.

You need to open the edit box context menu to see it. On some devices, you get this by long tapping on a word. On others, it appears when you double tap. Then there will appear an arrow which points to the left and forms an arc (a bit like a rainbow in shape) as the first menu item. If it is missing, then undo is not available at the moment, or not supported.
Lee321987
Junior Member
Junior Member
Posts: 10
Joined: 2021-12-10, 21:44 UTC

Re: [Feature] Undo for the Editor

Post by *Lee321987 »

I don't have an undo button in my context menu, but if I switch to a keyboard with a "Control" key (like "Hackers Keyboard"), I can use CTRL+z.

Total Commander 3.24
Android 7.0
Huawei tablet with EMUI 5.1.2
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Feature] Undo for the Editor

Post by *ghisler(Author) »

Do you mean in the editor? TC should add a curved right to left arrow when there is no undo menu item in the context menu.
Author of Total Commander
https://www.ghisler.com
Lee321987
Junior Member
Junior Member
Posts: 10
Joined: 2021-12-10, 21:44 UTC

Re: [Feature] Undo for the Editor

Post by *Lee321987 »

Yeah - the TC text editor.
No "undo" button or context menu item.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Feature] Undo for the Editor

Post by *ghisler(Author) »

Your EMUI version is probably too old. My Huawei tablet Mediapad M5 (model SHT-W09) has EMUI 9.1.0 and shows the Undo context menu item.

I'm loading the (private) editor method "canUndo" to check whether the current edit box allows Undo or not. This doesn't seem to work on your device.
Author of Total Commander
https://www.ghisler.com
Post Reply