Giter Club home page Giter Club logo

Comments (5)

dungpa avatar dungpa commented on July 19, 2024

@jaredpar Is there any way to capture Ctrl-Z after hitting Ctrl-K F or Ctrl-K D in Visual Studio SDK?

If you can find time to help with this, it would be great. Thanks.

from fantomas.

jaredpar avatar jaredpar commented on July 19, 2024

It is possible to capture Ctrl+Z but I don't think that is what you want to do here. It sounds like you just want the caret position to be correct on an undo / redo of the format document command. If that is the case the best way to do this is to use an undo transaction to track the caret. After which it will be properly adjusted on all undo / redo operations. I will send out a sample here in just a bit.

from fantomas.

jaredpar avatar jaredpar commented on July 19, 2024

Note if you're interested in the subtle insanity that is VS undo I have a bit of documentation here

https://github.com/jaredpar/VsVim/blob/master/Src/VimCore/UndoRedoOperations.fs

Should have a PR for this bug in the next hour or so.

from fantomas.

jaredpar avatar jaredpar commented on July 19, 2024

I just sent a pull request which fixes this bug. Undo / Redo is a very tricky part of Visual Studio. It took me at least 4 tries in VsVim to really understand the details of how it works. Feel free to send me any questions about the code.

from fantomas.

dungpa avatar dungpa commented on July 19, 2024

@jaredpar Awesome. I will read the pull request and ask if anything is not clear.

from fantomas.

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.