Git Product home page Git Product logo

Comments (4)

retep998 avatar retep998 commented on June 27, 2024

As stated in the earlier discussion, I'll be glad to cover the Windows side of things.

from term.

asolove avatar asolove commented on June 27, 2024

I am new to contributing to Rust and interested in filling in some of these holes as part of a small project to add a pretty progress indicator to the compiler: rust-lang/rust#24335

I started a branch that implements cursor_up and delete_line for terminfo here: https://github.com/asolove/term/tree/more-shortcuts I am going to do some research and try to implement those for Windows as well.

I would appreciate any feedback, and especially any ideas about how to write tests for this. Also, what is the chance these two functions would land by themselves, rather than as part of a larger effort to add many more of the missing ones?

from term.

retep998 avatar retep998 commented on June 27, 2024

To implement cursor_up, use GetConsoleScreenBufferInfo to get the current position of the cursor and then SetConsoleCursorPosition to set its position above that. delete_line, which I assume simply blanks the current line can be implemented by using WriteConsoleOutput to write a rectangular region of spaces, using GetConsoleScreenBufferInfo to figure out the current line and width and then SetConsoleCursorPosition to reset the cursor position if needed.

from term.

retep998 avatar retep998 commented on June 27, 2024

If you just submit a PR with the new features implemented for terminfo only with documentation clearly stating what the function is expected to do, then I can easily fill in the Windows implementation afterwards.

from term.

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.