Replies: 2 comments
-
It has nothing to do with the text properties. The Btw, the peek window should look prettier if you disable the line number. |
Beta Was this translation helpful? Give feedback.
-
Oh, I see. I mistakenly saw citre-peek window "float" above the code and covered some region so that these region under the "float" window was invisible. I think I need to get my eyes checked ( ̄ー ̄). Anyway, thank you for your patient answer <3 ! |
Beta Was this translation helpful? Give feedback.
-
I notice the
peek
window behaves like floating window.I'm very curious about how it works tbh, and I dive into the source code(perm link):
I have notice we use
overlay-put .. 'after-string
to show the content inside overlay. It is weird to me that I thoughtafter-stirng
cannot make a overlay float, it can only append content to a certain region:Moreover, I found the actual property of citre's overlay is:
;; (overlay-properties citre-peek--ov) 0 1 (display (left-fringe citre-peek-fringe citre-peek-border-face) face citre-peek-border-face) 1 2 (display (right-fringe citre-peek-fringe citre-peek-border-face) face citre-peek-border-face) 2 3 (face citre-peek-border-face) 3 7 (face (... default) fontified t) 7 13 (fontified t face (... font-lock-keyword-face default)) 13 14 (face (... default) fontified t) 14 17 (fontified t face (... font-lock-type-face default)) 17 18 (face (... default) fontified t) 18 23 (fontified t face (... font-lock-type-face default)) 23 25 (face (... default) fontified t) 25 58 (fontified t face (... font-lock-function-name-face default)) 58 62 (face (... default) fontified t) 62 63 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 63 64 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 64 65 (face (... default) fontified t) 65 73 (face (... default) fontified t) 73 76 (fontified t face (... font-lock-type-face default)) 76 77 (face (... default) fontified t) 77 82 (fontified t face (... font-lock-type-face default)) 82 84 (face (... default) fontified t) 84 90 (fontified t face (... font-lock-variable-name-face default)) 90 93 (face (... default) fontified t) 93 96 (fontified t face (... font-lock-keyword-face default)) 96 97 (face (... default) fontified t) 97 104 (fontified t face (... font-lock-type-face default)) 104 109 (face (... default) fontified t) 109 110 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 110 111 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 111 112 (face (... default) fontified t) 112 120 (face (... default) fontified t) 120 123 (fontified t face (... font-lock-keyword-face default)) 123 125 (face (... default) fontified t) 125 130 (fontified t face (... font-lock-type-face default)) 130 135 (face (... default) fontified t) 135 139 (fontified t face (... font-lock-keyword-face default)) 139 149 (face (... default) fontified t) 149 155 (fontified t face (... font-lock-function-call-face default)) 155 160 (face (... default) fontified t) 160 161 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 161 162 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 162 163 (face (... default) fontified t) 163 175 (face (... default) fontified t) 175 178 (fontified t face (... font-lock-keyword-face default)) 178 180 (face (... default) fontified t) 180 181 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 181 182 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 182 183 (face (... default) fontified t) 183 199 (face (... default) fontified t) 199 201 (fontified t face (... font-lock-keyword-face default)) 201 204 (face (... default) fontified t) 204 225 (fontified t face (... font-lock-function-call-face default)) 225 226 (face (... default) fontified t) 226 227 (fontified t face (... font-lock-variable-name-face default)) 227 231 (face (... default) fontified t) 231 232 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 232 233 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 233 234 (face (... default) fontified t) 234 254 (face (... default) fontified t) 254 260 (fontified t face (... font-lock-variable-use-face default)) 260 261 (face (... default) fontified t) 261 264 (fontified t face (... font-lock-function-call-face default)) 264 265 (face (... default) fontified t) 265 266 (fontified t face (... font-lock-variable-name-face default)) 266 268 (face (... default) fontified t) 268 269 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 269 270 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 270 271 (face (... default) fontified t) 271 288 (face (... default) fontified t) 288 289 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 289 290 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 290 291 (face (... default) fontified t) 291 305 (face (... default) fontified t) 305 310 (fontified t face (... font-lock-keyword-face default)) 310 312 (face (... default) fontified t) 312 321 (fontified t face (... font-lock-type-face default)) 321 322 (face (... default) fontified t) 322 323 (fontified t face (... font-lock-variable-name-face default)) 323 326 (face (... default) fontified t) 326 327 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 327 328 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 328 329 (face (... default) fontified t) 329 345 (face (... default) fontified t) 345 346 (fontified t face (... font-lock-variable-use-face default)) 346 347 (face (... default) fontified t) 347 362 (fontified t face (... font-lock-function-call-face default)) 362 365 (face (... default) fontified t) 365 366 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 366 367 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 367 368 (face (... default) fontified t) 368 381 (face (... default) fontified t) 381 382 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 382 383 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 383 384 (face (... default) fontified t) 384 393 (face (... default) fontified t) 393 394 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 394 395 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 395 396 (face (... default) fontified t) 396 404 (face (... default) fontified t) 404 410 (fontified t face (... font-lock-keyword-face default)) 410 418 (face (... default) fontified t) 418 419 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 419 420 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 420 421 (face (... default)) 421 427 (face (... citre-tag-annotation-face default)) 427 428 (face (... citre-tag-annotation-face default)) 428 440 (face (... citre-tag-annotation-face default)) 440 441 (face (... default)) 441 475 (face (... citre-tag-path-face default)) 475 476 (face (... default)) 476 479 (face (... warning default)) 479 480 (face (... default)) 480 481 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 481 482 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 482 483 (face (... default)) 483 489 (face (... default)) 489 490 (face (... citre-peek-symbol-face default)) 490 493 (face (... font-lock-function-name-face default)) 493 494 (face (... default)) 494 527 (face (... citre-peek-current-symbol-face default)) 527 528 (face (... default)) 528 529 (display (left-fringe citre-peek-fringe citre-peek-border-face)) 529 530 (display (right-fringe citre-peek-fringe citre-peek-border-face)) 530 531 (face (... default)) 531 532 (display (left-fringe citre-peek-fringe citre-peek-border-face) face citre-peek-border-face) 532 533 (display (right-fringe citre-peek-fringe citre-peek-border-face) face citre-peek-border-face) 533 534 (face citre-peek-border-face)) window #<window 71 on Player.java>)
While the properties of my overlay is:
Apparently citre use
display
to make its overlay window float, but it's wield that the actual code is:overlay-put .. 'after-string
.I suspect the content string in citre's overlay window has some text properties like
display
so it works. However, I spent some hours reading the code and still cannot figure out the mechanism.SOS
Beta Was this translation helpful? Give feedback.
All reactions