GNU bug report logs -
#14078
[PATCH] Fix 256 color mapping in rxvt.el
Previous Next
Reported by: oblique <psyberbits <at> gmail.com>
Date: Thu, 28 Mar 2013 20:08:02 UTC
Severity: normal
Tags: patch
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14078 in the body.
You can then email your comments to 14078 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14078
; Package
emacs
.
(Thu, 28 Mar 2013 20:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
oblique <psyberbits <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 28 Mar 2013 20:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Color mapping was wrong, I use the same way xterm.el does it.
---
lisp/term/rxvt.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el
index 0e026a8..6a62cff 100644
--- a/lisp/term/rxvt.el
+++ b/lisp/term/rxvt.el
@@ -201,7 +201,7 @@
(defun rxvt-rgb-convert-to-16bit (prim)
"Convert an 8-bit primary color value PRIM to a corresponding 16-bit value."
- (min 65535 (round (* (/ prim 255.0) 65535.0))))
+ (logior prim (lsh prim 8)))
(defun rxvt-register-default-colors ()
"Register the default set of colors for rxvt or compatible emulator.
@@ -233,9 +233,10 @@ for the currently selected frame."
(tty-color-define (format "color-%d" (- 256 ncolors))
(- 256 ncolors)
(mapcar 'rxvt-rgb-convert-to-16bit
- (list (round (* r 42.5))
- (round (* g 42.5))
- (round (* b 42.5)))))
+ (list (if (zerop r) 0 (+ (* r 40) 55))
+ (if (zerop g) 0 (+ (* g 40) 55))
+ (if (zerop b) 0 (+ (* b 40) 55)))))
+
(setq b (1+ b))
(if (> b 5)
(setq g (1+ g)
--
1.8.1.5
Reply sent
to
Chong Yidong <cyd <at> gnu.org>
:
You have taken responsibility.
(Tue, 17 Dec 2013 16:05:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
oblique <psyberbits <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 17 Dec 2013 16:05:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 14078-done <at> debbugs.gnu.org (full text, mbox):
oblique <psyberbits <at> gmail.com> writes:
> Color mapping was wrong, I use the same way xterm.el does it.
Thanks, committed to trunk.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 15 Jan 2014 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 93 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.