Issue 45 in shellinabox: erroneous cursor position

27 views
Skip to first unread message

shell...@googlecode.com

unread,
Jan 9, 2010, 12:00:18 PM1/9/10
to shell...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 45 by dion...@videolan.org: erroneous cursor position
http://code.google.com/p/shellinabox/issues/detail?id=45

What steps will reproduce the problem?
1. Use the following PS1 for zsh: "%{^[[33;36;1m%}%T%{^[[0m%}
%{^[[33;31;1m%}%n%{^[[0m^[[33;33;1m%}@%{^[[33;37;1m%}%m
%{^[[33;32;1m%}%~%{^[[0m^[[33;33;1m%}%#%{^[[0m%} " (you'll need to retype
the ^[ chars)
2. The cursor will appear inside the PS1 output if no character is typed on
the line. The cursor is correctly aligned for lines containing 1 or more
characters.

Note that using a similar line on bash doesn't cause the same problem
("\[\e[1;36m\]\A \[\e[1;31m\]\u\[\e[1;33m\]@\[\e[1;37m\]\h
\[\e[1;32m\]\w\[\e[1;33m\]% \[\e[0m\]").

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

shell...@googlecode.com

unread,
Jan 9, 2010, 12:04:23 PM1/9/10
to shell...@googlegroups.com

Comment #1 on issue 45 by dion...@videolan.org: erroneous cursor position
http://code.google.com/p/shellinabox/issues/detail?id=45

I forgot to mention that this is using svn r200. (It is also reproducible
with 2.10)

shell...@googlecode.com

unread,
Apr 23, 2010, 10:03:10 AM4/23/10
to shell...@googlegroups.com

Comment #2 on issue 45 by siev...@zedat.fu-berlin.de: erroneous cursor
position
http://code.google.com/p/shellinabox/issues/detail?id=45

I guess this is the same problem we have stumpled upon here.
Are you using Firefox?

In contrast to Opera which sets a font-family and a font-size for pre-tags
by default
the Firefox sets only a font-family by default.

Since shellinabox overrides the font-family for the #console pre-tags, but
forgets
about the pre-tag, which includes the span-element with id #space, which is
temporarily build to calculate the cursor position in some cases (e.g. ^U
to clear
the line), the font-sizes differ.

Solution:
Change the line in file shellinabox/styles.css:47 from

#vt100 #console, #vt100 #alt_console, #vt100 #cursor, #vt100 #lineheight {

to

#vt100 #console, #vt100 #alt_console, #vt100 #cursor, #vt100 #lineheight,
#vt100
.hidden pre {

I hope this helps. It took me some while to figure it out :-)

Jan

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


--
Subscription settings: http://groups.google.com/group/shellinabox/subscribe?hl=en

shell...@googlecode.com

unread,
Sep 3, 2010, 1:02:14 PM9/3/10
to shell...@googlegroups.com

Comment #3 on issue 45 by dionoea: erroneous cursor position
http://code.google.com/p/shellinabox/issues/detail?id=45

Yup, that fixed it. Thanks!

shell...@googlecode.com

unread,
Sep 3, 2010, 1:29:56 PM9/3/10
to shell...@googlegroups.com
Updates:
Status: Fixed

Comment #4 on issue 45 by zod...@gmail.com: erroneous cursor position
http://code.google.com/p/shellinabox/issues/detail?id=45

Thank you! This fixes a bunch of other bugs, too, I think.

Jan, I owe you a beer :-)

Reply all
Reply to author
Forward
0 new messages