Comments (12)
Yes, I'd seen that, but hadn't really worried about it too much. It's because I'm resetting a bunch of things when you reach the beginning of the history list, which includes where you're up to in the list. I've just pushed a minor tweak that restores that value (slight hack, ah well).
Want to try it now (on the #29 branch)?
from embeddedcli.
Yes, I'd seen that, but hadn't really worried about it too much. It's because I'm resetting a bunch of things when you reach the beginning of the history list, which includes where you're up to in the list. I've just pushed a minor tweak that restores that value (slight hack, ah well).
Want to try it now (on the #29 branch)?
Perfect, working as expected now! :)
from embeddedcli.
Great!
I'll close this issue, since it relates to things we've resolved. Let me know if you have any other problems.
Thanks for the report.
from embeddedcli.
Hi,
That seems like a pretty reasonable/easy requirement. Can you tell me if #28 works how you'd expect?
from embeddedcli.
Hi! It's early in the morning here so I will take a look later today, I was going to create a PR myself!
I'll let you know after I pull this in, many thanks for a fast reply!
from embeddedcli.
Hi,
That seems like a pretty reasonable/easy requirement. Can you tell me if #28 works how you'd expect?
Yes, I just tried it and that is indeed working! :)
However...I'm seeing an issue when going through the history, the issue occurs no matter what terminal I am using, basically it I type a few commands and then use up and down you can see that once I just the earliest entry and start going the other way, the history goes wrong and starts deleting part of prompt.
Now, my prompt does have ANSI escape sequences in it to colorise it, so I don't know if that's contributing to it. I need to take a look later on and see if I can see why this is happening, I have attached a GIF showing it happening and hopefully GitHub will show it.
from embeddedcli.
I've just done a check in main
, and I can still replicate this. So I don't think this is a result of this change. It looks like going up is ok, but when you go down the cursor ends up at the beginning of the line, not the end, then the next time you hit down it backspaces too far.
I'll have a look as well - please let me know if you find the cause.
from embeddedcli.
from embeddedcli.
Ah, I think I might have spotted it. This stuff is a bit hairy, and I realise now that this code if pretty poorly documented. The upshot is that if you reach the end of the history, it doesn't reset the buffer to empty, which means it backspaces over characters that it's not drawing.
Can you try this one? I'll merge the is_last
stuff
#29
from embeddedcli.
Ah, I think I might have spotted it. This stuff is a bit hairy, and I realise now that this code if pretty poorly documented. The upshot is that if you reach the end of the history, it doesn't reset the buffer to empty, which means it backspaces over characters that it's not drawing.
Can you try this one? I'll merge the
is_last
stuff
Thanks! I will check in a bit, going to have a good look at the code and see if I can add anything I think is missing!
from embeddedcli.
Ah, I think I might have spotted it. This stuff is a bit hairy, and I realise now that this code if pretty poorly documented. The upshot is that if you reach the end of the history, it doesn't reset the buffer to empty, which means it backspaces over characters that it's not drawing.
Can you try this one? I'll merge the
is_last
stuff #29
Ok, this has resolved the issue with the dissappearing prompt, however, moving through the history seems a bit weird, it seems to wrap around when you press up, but down behaves as I would expect (stopping at the end), this means that because it wraps going up, you can go past the start but then can't go back down since you get stuck, so you have to go all the way back around to the command you want going up.
I realise that I probably haven't explained that very well.
The behaviour I would expect is no matter which direction you go through the history that either the start or the end of the history should be a hard stop.
I'm going to have a look at the code and get acquainted with it!
I really appreciate your responses here, I know that writing open-source software can sometimes be a thankless task!
from embeddedcli.
Great!
I'll close this issue, since it relates to things we've resolved. Let me know if you have any other problems.
Thanks for the report.
You're welcome, many thanks for taking on board my suggestion and then fixing the subsequent issues I discovered!
Cool little library!
from embeddedcli.
Related Issues (4)
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 embeddedcli.