Git Product home page Git Product logo

Comments (9)

Alexey-T avatar Alexey-T commented on August 17, 2024

That part with undo/redo merging steps is difficult, I wont promise the fix. Will see.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

Reproduced on this text, when caret is at the end of line 3

dddddddddd
ddddddddddd
dddddddddddddd
ddddddddddddddd

we must move to shorter line when doing Shift+Up.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

We have variable PauseForMakingGroup=1500 (in msec). if pause between actions is smaller, actions are later undone as a whole. I reduced this pause to 400. now if I press Undo / Undo with pause at least 400, Redo will revert them as separate actions, as you want.
this pause is not the global option yet. not sure it's needed.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

beta linux-qt5, rename to *.xz.
cudatext.xz.zip

from cudatext.

pintassilgo avatar pintassilgo commented on August 17, 2024

Thanks.

I think this can be a OK solution, but an important improvement should be made: undo/redo must NOT be affected by this var.

Example:

I'm editing user.json. I delete some lines one by one, like line 5, line 10, line 15, line 20 and line 25. Then, if I press Ctrl+Z multiple times, I can reinsert these lines one by one, good.

But if I HOLD Ctrl+Z to run many undos fast, my undo history becomes a complete mess, with all the very separated lines merged to a single redo action. It shouldn't be that way. Having the proper undo/redo history intact can be important sometimes.

So: there should be an exception so that running consecutive undo/redo shouldn't be able to merge multiple undo items into one.

from cudatext.

pintassilgo avatar pintassilgo commented on August 17, 2024

Other real scenario affected if you don't fix what I described in previous comment:

I'm writing a long text or code, working hours on it, with many typing and deleting. At some point, I feel I'm not satisfied with current content and decide to return to a previous state and continue to write from there. Instead of holding Ctrl and tapping Z many times until my finger hurts, I simply hold Ctrl+Z for fast multiple undos, looking at when it's near the point I will choose to restart.

When I release the keys, I pause to look carefully, then I decide I don't want to stop there, but a bit later. So now I need to run some redo's (Ctrl+Shift+Z). But now my undo history was already lost, because while I was holding Ctrl+Z my many undo entries were merged. So I no longer have the middle states to redo.

You don't see this issue in any other editor, it's clearly a bug.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

I agree. I will try to fix that.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

next attempt, beta.

cudatext.xz.zip

from cudatext.

pintassilgo avatar pintassilgo commented on August 17, 2024

Looks good, thanks.

from cudatext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.