Git Product home page Git Product logo

Comments (3)

dankox avatar dankox commented on July 17, 2024

I'm not quite sure if I understand. When I'm erasing character with backspace the cursor is in front of such character. If it's in the beginning of the line the cursor move the the end of line before which I can see (unless it's not wrapping and the line extends out of the visible screen/terminal).

I can also see the character under the cursor (which the cursor is on top). So I'm not really sure what is required. Could you maybe provide some videos/gifs to better show the problem and maybe the solution which is probably in other terminal applications?

from gocui.

 avatar commented on July 17, 2024

unless it's not wrapping and the line extends out of the visible screen/terminal

This

1 and 3 gifs show current behaviour, 2 and 4 desirable , in my opinion.

The start of line case

PowerShell 2022-06-16 18-52-43

PowerShell 2022-06-16 18-53-47

The middle/end of line case

PowerShell 2022-06-16 18-53-20

PowerShell 2022-06-16 18-54-04

from gocui.

dankox avatar dankox commented on July 17, 2024

Oh I see what you mean. Yeah, that's a problem.
The first one is actually a bug. It should move to that location, but because it's updating the coordinates directly and not using MoveCursor it doesn't update view origin correctly.

The second one is a bit tricky though. I've created a quick fix for now, which you can test by getting gocui from here:
https://github.com/dankox/gocui/tree/fix/move-cursor-when-no-wrap

It's working for me, but there is still one thing which I need to resolve and that is when the view's width is 1 character, it doesn't display correctly (or not the same way as before this fix). So I need to address that and then I will create PR.
But if you would be able to confirm that this works for you, that would be great.

from gocui.

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.