Comments (4)
I had a similar problem so I went digging:
EditorBuilder::build_sync
will send these bytes and expect a response indicating the terminal size
Lines 46 to 52 in 6e6d8b7
Your Console
provides an invalid response which results in the error.
Btw, you should use self.0.pop()
instead of self.0.last()
in your Read
impl.
from noline.
@Tim-Paik Sorry for not responding, I missed the github notification so I didn't see this before now.
Do you have a full example I can have a look at?
from noline.
@Tim-Paik Sorry for not responding, I missed the github notification so I didn't see this before now.
Do you have a full example I can have a look at?
You can execute the following command to reproduce my problem
cargo new nolinetest
cd nolinetest
cargo add noline --features alloc
Populate src/main.rs
with the code from main.rs
that I provided at the beginning, after that, you can use cargo run
to run it
I had a similar problem so I went digging:
EditorBuilder::build_sync
will send these bytes and expect a response indicating the terminal sizeLines 46 to 52 in 6e6d8b7
Your
Console
provides an invalid response which results in the error.Btw, you should use
self.0.pop()
instead ofself.0.last()
in yourRead
impl.
Looks like you're making sense, since I'm not providing a terminal width, which noline definitely needs. But I don't know how should I provide the size of the terminal...
from noline.
Noline expects to be connected to an ANSI terminal. During init, noline probes the terminal using ANSI escape codes to get the size of the terminal. You can have a lock at here for an example of a mockterminal.
But, what is your use case here? Without an actual terminal, noline isn't of much use.
from noline.
Related Issues (14)
- MVP
- Implement auto-complete
- Implement history HOT 1
- Shall noline offer a way to print lines while readlining? HOT 2
- Add support for grapheme clusters
- Std IO Mangled
- noline under IRQ, not polling HOT 7
- Implementing embassy async Editor HOT 2
- CarriageReturn or LineFeed HOT 2
- History subtract with overflow HOT 1
- 0.2.1 release
- Prepare release 0.3.0
- no_std examples fails after `usbd-hid` update HOT 2
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 noline.