dify icon indicating copy to clipboard operation
dify copied to clipboard

Windows (Windows Terminal or cmd.exe): bold and italic shown without format

Open jiangbo721 opened this issue 11 months ago • 6 comments

Summary

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

[!Tip] Close issue syntax: Fixes #<issue number> or Resolves #<issue number>, see documentation for more details.

Screenshots

Before After
... ...

Checklist

[!IMPORTANT]
Please review the checklist below before submitting your pull request.

  • [ ] This change requires a documentation update, included: Dify Document
  • [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [x] I've updated the documentation accordingly.
  • [x] I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

jiangbo721 avatar Mar 28 '25 13:03 jiangbo721

3. run the following command, to set the style of the visual selected text to italic or bold:

hi Visual term=italic gui=italic
hi Visual term=bold gui=italic

I guess 'termguicolors' is not set, can you confirm? term=italic also doesn't work for me in kitty on macOS with :set notermguicolors.

justinmk avatar Mar 27 '25 22:03 justinmk

Try using cterm instead of term

zeertzjq avatar Mar 27 '25 23:03 zeertzjq

Try using cterm instead of term

With cterm I get the same results.

Nekketsu avatar Mar 28 '25 01:03 Nekketsu

  1. run the following command, to set the style of the visual selected text to italic or bold:
hi Visual term=italic gui=italic
hi Visual term=bold gui=italic

I guess 'termguicolors' is not set, can you confirm? term=italic also doesn't work for me in kitty on macOS with :set notermguicolors.

Checking:

set termguicolors?

It returns:

termguicolors

Toggling the setting, when I disable it I can see the bold and italic text... But no colors. Very strange. With termguicolors: Image

With notermguicolors: Image

I have been playing with Windows Terminal config, and setting:

"intenseTextStyle": "all"

I can see that it shows a bit bolder. But it doesn't show the italic yet. And I think it's not the same intense than bold. Image

However, with notermguicolors it shows correctly the italic and bold text, even when I configure or not the Windows Terminal setting intenseTextStyle to all or bright (default value).

And just to remind you, it used to work correctly for me a few weeks or months ago. I don't know when it started failing. I had the colorscheme tokyonight, which by default shows the comments in italic, and I can remember to see the italic correctly, and the bold also correctly.

Nekketsu avatar Mar 28 '25 01:03 Nekketsu

Cannot reproduce on latest Windows Terminal Canary, or Windows Terminal latest official, on nvim 0.11.4 installed with winget install neovim/neovim on Windows 10.0.19045.5737 (22H2)

craigmac avatar Oct 02 '25 13:10 craigmac