Closed gl4eqen closed 6 years ago
No one has reproduced the issue since June? It is pretty apparent bug.
I don't know if it helps anyone but I was able to reproduce this issue as well. But for me it seems to be happening only with spacemacs-dark
or spacemacs-light
themes.
(erlang elixir elm sql nginx csv typescript
(auto-completion :variables auto-completion-return-key-behavior 'complete auto-completion-tab-key-behavior 'cycle auto-completion-enable-snippets-in-popup nil auto-completion-enable-help-tooltip t auto-completion-enable-sort-by-usage t :disabled-for org)
better-defaults bibtex clojure
(c-c++ :variables c-c++-default-mode-for-headers 'c++-mode c-c++-enable-clang-support t)
emacs-lisp docker git go gtags html ibuffer ipython-notebook javascript latex markdown
(org :variables org-enable-reveal-js-support t)
(python :variables python-backend 'anaconda python-test-runner 'pytest python-auto-set-local-pyenv-version 'on-visit)
prodigy
(ranger :variables ranger-show-preview t)
search-engine
(shell :variables shell-default-shell 'eshell shell-default-position 'bottom shell-default-height 30)
(spell-checking :variables spell-checking-enable-by-default t)
slack pandoc rust spotify syntax-checking version-control themes-megapack yaml xkcd)
No one has reproduced the issue since June? It is pretty apparent bug
I think more people have experienced this issue. It just, no one has taken an effort to hunt this bug down and fix it.
@OndrejZapletal this is interesting.
@nashamri you might be interested in this 😸
I'm an illiterate when it comes to lisp BUT my incredible general-purpose-programming-skills led me to commenting out lines in .emacs.d/core/libs/spacemacs-theme/spacemacs-common.el:584-587
and it appears to restore proper number lines behaviour.
However, I suppose it was purposely written to fix some bug so such change might break something.
I was able to reproduce the bug, and adding a :inherit line-number
property to the line-number-current-line
face in spacemacs-common.el
also solves the issue. There seems to be some problem with line-number-current-line
not inheriting properties from any face in spacemacs-theme. The command for scaling the text (text-scale-adjust
) works by changing the default face (see text-scale-mode
), so line-number-current-line
not inheriting from the default face (directly or indirectly) would explain the problem.
@nashamri I looked a bit into this and found several problems. First, the whole when
clause doesn't do what it needs to do:
(when (>= emacs-major-version 26)
`(line-number ((,class (:foreground ,lnum :background ,bg2))))
`(line-number-current-line ((,class (:foreground ,base :background ,bg2)))))
The when
returns just the last sexp, so the call to custom-theme-set-faces
only includes line-number-current-line
. The line-number
face is not changed.
For Emacs 25, the when
returns nil
. I don't know how custom-theme-set-faces
handles a nil
entry, but I assume if it was a problem we would've gotten a ton of issue reports already.
AFAICT, the line-number
face is supposed to inherit from default
, and line-number-current-line
is supposed to inherit from line-number
.
Replacing the single when
clause with two separate seems to work for me:
(when (>= emacs-major-version 26)
`(line-number ((,class (:foreground ,lnum :background ,bg2 :inherit default)))))
(when (>= emacs-major-version 26)
`(line-number-current-line ((,class (:foreground ,base :background ,bg2 :inherit line-number)))))
It isn't pretty, but solving the problem in a more elegant way would require bigger changes to dyn-let
or create-spacemacs-theme
and might not be worth the trouble.
What if we remove the condition entirely and set line-number
and line-number-current-line
also for Emacs 25? Calling custom-theme-set-faces
in stock Emacs 25.3 (without spacemacs-theme) to set line-number
doesn't cause any problems from what I could test.
@bmag Your solution works for me as well. Can we make it a PR to develop?
@Glaeqen I will make a PR upstream to spacemacs-theme.
Made the PR.
Fixed in develop by https://github.com/syl20bnr/spacemacs/pull/11570 :smile: This bug doesn't affect master branch, so closing it.
Glad I found this. I use a custom theme and I didn't realize it was theme relative and it wasn't inheriting the normal line number font size.
Description :octocat:
Wrong size of line number at cursor
Reproduction guide :beetle:
SPC-t-n
to turn line numbers on (if necessary)C-x C-+
or-
Observed behaviour: :eyes: :broken_heart: After
C-x C-+
, on line with cursor present line numbers size remains default instead of bigger/smaller one.Expected behaviour: :heart: :smile: Every line number has got the same size according to current zoom.
System Info :computer:
Default config on develop for purpose