Comments (4)
As stated in the earlier discussion, I'll be glad to cover the Windows side of things.
from term.
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.
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.
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)
- Support parsing termcap HOT 11
- Check isatty == false before coloring HOT 11
- tag version v0.4.0? HOT 2
- How to fall back on std::io::stderr() if term::stderr() fails? HOT 8
- Better MSYS2 support HOT 14
- WinConsole's tty check is inaccurate HOT 1
- All Terminal methods leak memory on Windows HOT 7
- better support for multithreaded programs HOT 9
- Use `el` not `dl` to erase a line?
- How to store and pass around `Terminal` of any type. HOT 3
- `Terminal` should probably buffer
- panic with operation not supported by the terminal while libterm works fine HOT 3
- Term crashes on FreeBSD HOT 7
- No output to stdout when no TTY attached in Docker container HOT 2
- term::stdout() returns None unexpectedly HOT 3
- terminfo problem while using rogcat HOT 2
- Write plain text when running under a start/stop daemon like systemd ?
- [LFM] Looking For Maintainer HOT 11
- Last release was in February 2018 HOT 1
- Please relase a new version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from term.