Code Monkey home page Code Monkey logo

Comments (5)

hediet avatar hediet commented on July 20, 2024 1

In a lot of cases it seems to just work (as in, the cursor remains at the same position).

It works when the edit does not touch the cursor. Otherwise, the cursor will be placed at the boundaries.

I doubt this will be useful for you though.

I recommend you to explicitly set the cursor after sending the edit.

from js-assistant.

lgrammel avatar lgrammel commented on July 20, 2024

Thanks for the bug report! I'll take a look - it seems the text the cursor was originally at got removed in this case. Do you know how VSCode updates the position on edits? In a lot of cases it seems to just work (as in, the cursor remains at the same position).

from js-assistant.

lgrammel avatar lgrammel commented on July 20, 2024

Thanks! Moving the cursor seems like a good approach, agreed.

from js-assistant.

lgrammel avatar lgrammel commented on July 20, 2024

I have trouble reproducing this bug with P42 v1.121.2 and VS Code v1.68.1. Which VS Code version are you using?

Screen.Recording.2022-07-06.at.10.33.30.mov

One of the things that could be causing this is that P42 sometimes produces larger-than-needed edits. I'll add a edit minimizer soon, this should potentially deal with some of this, but until I can reproduce it I can't say for certain.

Another reason could be that there is some text edited that is off-screen in your recording. Could you share the original snippet in case you still have it?

from js-assistant.

lgrammel avatar lgrammel commented on July 20, 2024

I've tried this again with VS Code 1.69 and P42 v1.124.0 (which minimizes edits). I can't reproduce the bug for this combination. Please re-open if you still run into it.

from js-assistant.

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.