Comments (3)
Same here on Vanilla Emacs. Sadly it is unusable due to this. Has anyone found a way to work around this issue?
from emacs-libvterm.
Ok I fixed it on NixOS by using the unstable version of the package
from emacs-libvterm.
For those who struggle with this issue, I have fixed it by overriding the original vterm--get-color
:
(defun km-vterm--get-color (index &rest args)
"Retrieve the color by INDEX from `vterm-color-palette'.
A special INDEX of -1 refers to the default colors. ARGS can
optionally include `:underline’ or `:inverse-video’ to indicate
cells with these attributes. If ARGS contains `:foreground',
return the foreground color of the specified face instead of the
background color.
This function addresses an issue where the foreground color in
vterm may match the background color, rendering text invisible."
(let ((foreground (member :foreground args))
(underline (member :underline args))
(inverse-video (member :inverse-video args)))
(let* ((fn (if foreground #'face-foreground #'face-background))
(base-face
(cond ((and (>= index 0)
(< index 16))
(elt vterm-color-palette index))
((and (= index -1) foreground
underline)
'vterm-color-underline)
((and (= index -1)
(not foreground)
inverse-video)
'vterm-color-inverse-video)
((and (= index -2))
'vterm-color-inverse-video))))
(if base-face
(funcall fn base-face nil t)
(if (eq fn 'face-background)
(face-foreground 'default)
(face-background 'default))))))
(advice-add 'vterm--get-color :override #'km-vterm--get-color)
This solution works well for my setup, but other users may need to adjust it further based on their specific configuration or themes.
from emacs-libvterm.
Related Issues (20)
- vterm-module-compile could not detect build failure
- unable to locally remap default face HOT 1
- Is there a function that behaves like `vterm-clear`, but deletes the previous lines in the shell as well? HOT 3
- Terminal programs do not receive shortcuts led by the Shift modifier
- Text is not visible HOT 2
- When starting vterm abfter a new compile I get the error "Wrong number of arguments: #<subr string-match>, 4"
- Error compile vterm-module and change reques for cmake 3.10 and target_include_directories(vterm-module ...)
- auto-dim-other-buffers broken by recent face changes
- Hostname issue in bash HOT 3
- Need compatibility check and auto rebuild for native module
- can emacs and libvterm run standalone as a terminal? HOT 1
- Option to run a custom command instead of the sell HOT 1
- Old emacs-module.h vs using one from an Emacs installation HOT 3
- emacs-vterm and dnd (drag and drop)
- query-replace in vterm HOT 2
- Compilation fails on Mac OS when libtool is not named "glibtool" HOT 1
- ls --color=auto does not show colors in vterm
- Characters with different height make some lines not to fit in the *vterm* window
- How do I configure EDITOR so that programs in vterm using EDITOR will use emacs? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-libvterm.