Giter VIP home page Giter VIP logo

Comments (32)

Alexey-T avatar Alexey-T commented on June 16, 2024 1

if we add multi-line feature, we need

  • separare BG-color and font-color for all lines
  • separate Tags (int) for lines
  • separate removing of lines from n lines

it is hard to add. I want it simple

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024 1

Added.

  • add: PROP_CORNER_TEXT supports multi-line text
  • add: Editor.get_prop/set_prop: PROP_CORNER_FONT_NAME, PROP_CORNER_FONT_SIZE

Screenshot from 2024-01-24 11-47-07

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024 1

fixed now.

from cudatext.

veksha avatar veksha commented on June 16, 2024 1

Looking good:
image
image
image

from cudatext.

veksha avatar veksha commented on June 16, 2024 1

or hard-coded padding 2-3 px

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

do you know plugins that uses this API?

none. it is very new.

that it doesn't support multiline mode.

yes it does not. LSP diagnostic is bad here - line is long, so last editor line will be overplaced. API is for SHORT lines.

from cudatext.

veksha avatar veksha commented on June 16, 2024

last editor line will be overplaced

its not a problem, diagnostic will be shown only if caret is on line with error. use case: user reads error text (no need to use mouse at all) and fixes error. and corner text is gone.

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

then it is thje same as using embedded dialog at the bottom?

from cudatext.

veksha avatar veksha commented on June 16, 2024

dialog is for list, list can containt warnings, hints.. dialog can be hidden, Console can be opened (to read prints). so line is very convenient. don't you think? what use cases do you have in mind for this API?

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024
  • show unicode-name of char there
  • show 'Vim mode is active' mark

from cudatext.

veksha avatar veksha commented on June 16, 2024

i see code for displaying "R" for macro recording. is it working? i don't see "R" after using Record macro command.

CudaText/app/formframe.pas

Lines 3682 to 3685 in 79a98a4

if FMacroRecord then
begin
Ed1.OptBorderColor:= GetAppColor(TAppThemeColor.EdMarkers);
Ed1.OptCornerText:= 'R';

what if lsp will have this feature disabled by default? one line. will it interfere with other plugins?

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

I see 'R' after I call 'start/stop macro record' from cmd-palette.

Screenshot from 2024-01-23 13-42-38

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

what if lsp will have this feature disabled by default? one line. will it interfere with other plugins?

it will not.

from cudatext.

veksha avatar veksha commented on June 16, 2024

I see 'R' after I call 'start/stop macro record' from cmd-palette.

try with "keep_sel_font_color" : true,

from cudatext.

veksha avatar veksha commented on June 16, 2024

what if lsp will have this feature disabled by default? one line. will it interfere with other plugins?

it will not.

but every ed.set_prop(PROP_CORNER_TEXT, '123') will overwrite text that was already added there by another plugin.
do you think plugin devs should get existing corner text and add own text to it and the remove what was added in the end?
or API is new and will be changed?

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

try with "keep_sel_font_color" : true

fixed.

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

do you think plugin devs should get existing corner text and add own text to it and the remove what was added in the end?

yes, I thought that plugins can add the text, or they can restore old text when removing own text.

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

reopened if we need to discuss it.

from cudatext.

veksha avatar veksha commented on June 16, 2024

Simpler multiline painting:
If newlines have been found just paint all lines with the same color.

and no need for tags, etc.
it's ok for plugins to overwrite each others corner text, i think. it's just temporary info. (like statusbar)

from cudatext.

veksha avatar veksha commented on June 16, 2024

another thing: make non-monospaced font available for corner text.
(this can be enough to read long lsp diagnostic message)

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024
  • add: Editor.get_prop/set_prop: PROP_CORNER2_FONT_NAME
  • add: Editor.get_prop/set_prop: PROP_CORNER2_FONT_SIZE

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

@veksha if you forgot about it:

  • add: Editor.decor: DECOR_GET_ALL now can return all items for given line, if "line">=0

from cudatext.

veksha avatar veksha commented on June 16, 2024

thanks for new changes!

small issue: if some lines have unicode emoji and some doesn't we will get gaps between them:

image

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

paste the Console command here.

from cudatext.

veksha avatar veksha commented on June 16, 2024
ed.set_prop(PROP_CORNER_FONT_SIZE, 15); ed.set_prop(PROP_CORNER_FONT_NAME, 'default') ; ed.set_prop(PROP_CORNER_TEXT, '🙂text\n'*3 + 'text2\n'*3 + 'text3')

image

from cudatext.

veksha avatar veksha commented on June 16, 2024

i think the border is not working after you added multiline support.

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

fixed it too, later. currently ok?

from cudatext.

veksha avatar veksha commented on June 16, 2024

pulled last changes. yes, now ok.

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

good...

from cudatext.

ildarkhasanshin avatar ildarkhasanshin commented on June 16, 2024

напрашиваются еще настраиваемые интервалы внутри/вне блока
PROP_CORNER_PADDING
PROP_CORNER_MARGIN
PROP_CORNER2_PADDING
PROP_CORNER2_MARGIN

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

not needed, IMHO.

from cudatext.

Alexey-T avatar Alexey-T commented on June 16, 2024

any padding >0 is bad for code: now I use TextOut which fills the BG. with padding: I will need to do additional FillRect..

from cudatext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.