Sergix / JTerm

A terminal written in Java for cross-platform compatibility and usage.
https://sergix.github.io/projects/jterm
GNU General Public License v3.0
52 stars 32 forks source link

Moving between lines #48

Closed nanoandrew4 closed 7 years ago

nanoandrew4 commented 7 years ago

Right now, when the cursor reaches the end of the window and moves to a new line, even though it is all being interpreted on the same line, it will not let you backspace on to the previous line.

Sergix commented 7 years ago

Hm, interesting. I'm not sure how we would go about fixing this though... is there a way to delete the previous newline and move the cursor up a line?

nanoandrew4 commented 7 years ago

I don't think so, no newline character exists because it is the terminal that is wrapping the text, not our program. Which means we have to get creative as to how to solve this...

Sergix commented 7 years ago

Hm, ok. I'll look into it.

nanoandrew4 commented 7 years ago

The problem with this is we do not own the GUI, so we can not determine what the character limit on the terminal window is.

Sergix commented 7 years ago

True... Any libraries that could help? I would just really not want to have to implement a GUI.

nanoandrew4 commented 7 years ago

I am with you on that one, but as far as I know there is no library for this, since it is terminal specific. I'll look into it at some point soon, unless someone else can show us the way...

nagharajan commented 7 years ago

@nanoandrew4 I have forked the code and uploaded the changes. Can you please take a look?

lbenedetto commented 7 years ago

I think I could handle implementing a GUI. I assume you mean for the GUI to replace running the program in the terminal?

nanoandrew4 commented 7 years ago

Not to replace, to accompany it. Users should be able to choose, but ideally in windows they would use a GUI in order to circumvent this issue.

lbenedetto commented 7 years ago

Hmm, why not though? Doing it in a GUI gives us much more control.

I think it would also remove the complexity of dealing with Unix vs Windows char codes and other weird behaviors of the windows terminal VS the unix terminal

chrome_2017-11-06_15-06-49

nanoandrew4 commented 7 years ago

This also has to work on headless systems, such as servers and such that don't have graphics... That's why we can't just move to a GUI. It is true that the GUI gives us all the control we need but we also have to support all those other systems.

lbenedetto commented 7 years ago

Ah, that's a good point, I hadn't thought of that.

Should I still move forward on the GUI, as an option?

nanoandrew4 commented 7 years ago

I think it's still a good idea, yes. That way we have that as a stable platform. Ultimately it's up to @Sergix, but I do think we are going to have to implement our own GUI at some point.

NCSGeek commented 7 years ago

Or, as a random suggestion, there could be a command to load a GUI. Somewhat comparable to the DOS windows command.

nanoandrew4 commented 7 years ago

You could just pass it as an argument too.