Remove the 'invisible t' property from the prompt display and use the
'opencode-request-margin-highlight' face instead to ensure the prompt is
visible to users while maintaining consistent styling.
fix: prompt visibility by using proper face instead of invisible property #9
choker/opencode.el:fix-prompt-visibility into main
Remove the 'invisible t' property from the prompt display and use the 'opencode-request-margin-highlight' face instead to ensure the prompt is visible to users while maintaining consistent styling.
personally I think the prompt looks cleaner with just the margin highlight and not showing "> " but obviously the text needs to show up. The invisible text property is supposed to be rear-nonsticky by default (meaning text inserted after it doesn't inherit the invisible property) but maybe in some emacs configurations it's different. I added it explicitly with (propertize "> " 'invisible t 'rear-nonsticky t) in dd220e4, does that fix it for you?
no, looks the same D:
but if i remove 'invisible t it seems to work. is the idea to make only the "> " invisible?
Yea that's the intention. Really I just added the invisible "> " as I couldn't get the prompt margin highlight to display at the last line of the buffer if there's nothing on it yet. , Although maybe it's also nice to have, so when you copy the text out of the buffer, and paste it somewhere as plaintext without the margin highlights, you still see what was the user prompt vs model response.
changing it to (propertize "> " 'display "") might be an option, with the downside that then when you copy and paste as plaintext you don't see the "> " to indicate the user prompts. but would be nice to figure out what's going on with emacs, why it's making the text after it invisible
edit: oops display "" does show it when pasting as plaintext, so I don't see any downside to making the change. Does that fix it for you? still would be nice to know what is going on with the invisible property just to satisfy my emacs curiosity
yep fixed, tysm <3
Pull request closed
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?