universal-ctags / citre

A superior code reading & auto-completion tool with pluggable backends.
GNU General Public License v3.0
326 stars 26 forks source link

peek, enhancement: fill fringes #92

Closed masatake closed 3 years ago

masatake commented 3 years ago

Close #91.

Signed-off-by: Masatake YAMATO yamato@redhat.com

AmaiKinono commented 3 years ago

Great idea!

AmaiKinono commented 3 years ago

I tested it a bit. It doesn't turn out to be very good-looking.

There are some weird white dashes (actually they are the vertical-bar bitmap):

image

The only solution I know is to define an empty bitmap by ourself:

(define-fringe-bitmap 'citre-peek-fringe [0])

and the display property should be like

'(left-fringe citre-peek-fringe citre-peek-border-face)

Then the dashes should gone.

Also, some definition info is lost.

Edit: I have 2 more ideas.

  1. Can we have a user option for this?
  2. I think I have some tricks to make the fringe borders look like having the same thickness as the horizontal borders. I could try and push to your branch after this PR is ready.
AmaiKinono commented 3 years ago

Symbol’s function definition is void: define-fringe-bitmap

I saw this. We are having some hard times with Emacs 26 :(

Another annoying thing is rx on Emacs 26 doesn't support certain constructs.

masatake commented 3 years ago

I saw this. We are having some hard times with Emacs 26 :(

Do you know any solution?

masatake commented 3 years ago

It seems that it is up to whether GUI is available or not.

AmaiKinono commented 3 years ago

It seems that it is up to whether GUI is available or not.

You should be right. diff-hl uses this function and it works for Emacs >25.1.

Edit: I saw it failed again. Well, let's use fboundp for now.

AmaiKinono commented 3 years ago

Thanks for your hard work!

I'll test and maybe do some more work on it tomorrow. Have a good dream for now ;)

AmaiKinono commented 3 years ago

I think I have some tricks to make the fringe borders look like having the same thickness as the horizontal borders.

image

It doesn't look very well. I'll stay with your approach.

A problem is the faces of the bottom 2 lines don't extend to the end. The reason is when replacing \n in the string, its face is dropped. But I've already fixed that.

AmaiKinono commented 3 years ago

Thanks!