-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use curses to support non-vt100 terminals? (request) #24
Comments
i think this would be the way to go. like #ifndef _KILO_ESCAPES
#define _KILO_ESCAPES
#define ESC_GO_RIGHT(n) ("\x1b[" #n "C")
#define ESC_GO_RIGHT(n) ("\x1b[" #n "B")
#endif and then in the code: /* Go to right/bottom margin and get position. */
if (write(ofd, ESC_GO_RIGHT(999) ESC_GO_DOWN(999), <calc length>) != 12) goto failed; and if you want to override, just do |
This'd probably work, I'll try it. |
I believe this project is just a fun, proof-of-concept minimal text editor, which can be used to build on. Also if you look at the commit log you can see there are no updates since Jul 10, 2016, even with smaller pull requests, so i doubt curses will be added .. |
yeah, that’s probably the idea. this project is about seeing what’s going on. ncurses is too “magic” for this project. |
I have an IBM 3161 ASCII terminal. The point of using curses is to make your programs terminal-independent. I think it'd be a very good idea to add it (though I understand this may push the 'lines of code' up a lot).
If your intention is portability, curses is the way to go. VT100 codes are not universal, although they are common. The 3161 doesn't emulate a VT100 either; it emulates the ADDS Viewpoint, ADM-3A, ADM-5, Hazeltine 1500, IBM 3101, and TeleVideo 910. None of those are VT100 compatible.
Alternately, a method to manually supply alternate escape codes would be good.
The text was updated successfully, but these errors were encountered: