CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

✨ Terminal Cursor Style, Width, Blinking

Open austincondiff opened this issue 2 years ago • 11 comments

Currently the integrated terminal in CodeEdit uses the block cursor and users have no ability to change this.

In Terminal settings, users should be able to set the cursor to either Block, Underline, or Vertical Bar and additionally toggle whether or not it blinks like so...

https://user-images.githubusercontent.com/806104/196791402-ea79b149-f079-4f91-aca6-d806c571eeb0.mp4

austincondiff avatar Oct 01 '22 05:10 austincondiff

@austincondiff Can you please add more details :)

prasoonmhwr avatar Oct 09 '22 16:10 prasoonmhwr

@prasoonmhwr ✅ Done. Would you like me to assign this one to you?

austincondiff avatar Oct 09 '22 16:10 austincondiff

@prasoonmhwr ✅ Done. Would you like me to assign this one to you?

Yes please, I would love to work on this :)

prasoonmhwr avatar Oct 09 '22 16:10 prasoonmhwr

@austincondiff may i know which file i can find this code

prasoonmhwr avatar Oct 11 '22 05:10 prasoonmhwr

@prasoonmhwr We are using SwiftTerm. It is implemented in CodeEditModules/TerminalEmulator/src.

austincondiff avatar Oct 11 '22 06:10 austincondiff

@austincondiff if I am making any changes in TerminalPreferences file it throws an error Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) , here is the screenshot of my changes Screenshot 2022-10-11 at 3 10 56 PM Screenshot 2022-10-11 at 3 11 13 PM

This is happening for String

prasoonmhwr avatar Oct 11 '22 09:10 prasoonmhwr

@prasoonmhwr I don't exactly know why an error is thrown here but may I suggest using an enum for cursorStyle? This can be implemented like the public var shell: TerminalShell.

Edit: Also, please try to embed code as a markdown code block instead of screen shots. This makes it a lot easier to read and to copy in case someone wants to try it out to help.

lukepistrol avatar Oct 11 '22 12:10 lukepistrol

Hey Guys,

I am using this terminal.cursorStyleChanged(source: terminal.getTerminal(), newStyle: SwiftTerm.CursorStyle.blinkUnderline) to update the cursor but this is not working in swiftTerm, any ideas? I even wrote to SwiftTerm Q&A but no reply yet.

prasoonmhwr avatar Oct 14 '22 10:10 prasoonmhwr

@prasoonmhwr I see your issue, https://github.com/migueldeicaza/SwiftTerm/issues/264. Hopefully they get back to you soon. I will look through their code and if anything jumps out at me I will let you know.

austincondiff avatar Oct 14 '22 20:10 austincondiff

@prasoonmhwr I found it posted in their API documentation here.

It can also be seen in their code here.

And here it is in the TerminalOptions.

You might also tackle #790 while you are at it as it is very similar.

austincondiff avatar Oct 14 '22 20:10 austincondiff

@austincondiff there is no reply in that issue and I have tried this TerminalOptions as well but no luck, what should we do now.

prasoonmhwr avatar Oct 20 '22 03:10 prasoonmhwr

https://user-images.githubusercontent.com/25121427/223324870-7d7f439f-aac3-4bc2-9e2f-c7e80efc590e.mov

bombardier200 avatar Mar 07 '23 04:03 bombardier200