CodeEdit
CodeEdit copied to clipboard
✨ Terminal Cursor Style, Width, Blinking
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 Can you please add more details :)
@prasoonmhwr ✅ Done. Would you like me to assign this one to you?
@prasoonmhwr ✅ Done. Would you like me to assign this one to you?
Yes please, I would love to work on this :)
@austincondiff may i know which file i can find this code
@prasoonmhwr We are using SwiftTerm. It is implemented in CodeEditModules/TerminalEmulator/src
.
@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
This is happening for String
@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.
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 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.
@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 there is no reply in that issue and I have tried this TerminalOptions
as well but no luck, what should we do now.
https://user-images.githubusercontent.com/25121427/223324870-7d7f439f-aac3-4bc2-9e2f-c7e80efc590e.mov