Giter Site home page Giter Site logo

Comments (2)

HiDeoo avatar HiDeoo commented on September 24, 2024

Thanks for the feedback.

This is not something that has been bothering me as I guess it's the output I expect altho I can see how some people may expect the behavior you describe.

When I have the time to finish the next version, I'll add an option for this, or maybe a different shortcut or maybe even both, not sure yet.

from toggler-vscode.

HiDeoo avatar HiDeoo commented on September 24, 2024

Finally got back to this issue, turns out implementing this is a bit annoying.

The cursor moving is actually the expected behavior for the code we're currently using. Instead of replacing a word when we don't have a selection, we're removing it and inserting the new word, which cause the cursor to move to the end of the word.

The reason behind this particular behavior is due to this issue in VS Code.

I just tried implementing a proof-of-concept where I manually move back the cursor to its initial position after an edit. Unfortunately, on top of being a pain for multiple cursor as edits are asynchronous, it also adds a very annoying visual glitch where you see the cursor moving back and forth after an edit.

I think I'll just wait for the forceMoveMarkers flag described in the linked issue to become part of the public API before implementing this option.

from toggler-vscode.

Related Issues (9)

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.