Code Monkey home page Code Monkey logo

Comments (3)

brooksmtownsend avatar brooksmtownsend commented on June 15, 2024

We calculate the position of the cursor semi-manually by using the width of the input pane and the amount of characters type so far to know when to wrap down to a lower line. It seems that terminal resizing does not trigger any recalculation in this cursor position, so I wonder if there's a resize event with Tui that we can use to recalculate the cursor position as that occurs. Here's the function that calculates the tuple (x_position, y_position) of the input cursor: https://github.com/wasmCloud/wash/blob/main/src/up.rs#L165. In order to calculate the correct position, I think we will need to assign the new input pane width to the input_width field, then it should move the cursor to the correct place

from wash.

brooksmtownsend avatar brooksmtownsend commented on June 15, 2024

This is all just to document where I think I can fix the issue, but if anyone looks at this as a start to contribute before I get here I wanted to provide some context 😄

from wash.

brooksmtownsend avatar brooksmtownsend commented on June 15, 2024

From #95 , I've added in a few

//TODO(issue #90):

snippets in the code, refer to these if looking to tackle this issue

from wash.

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.