You are not logged in.

#1 2019-12-30 21:01:07

gardotd426
Member
Registered: 2019-10-19
Posts: 48

[UNSOLVED]Weird Font Issues if Text is More than One Line in Terminals

So I have had this issue on Arch and Manjaro both, and with both kitty terminal and various versions of gnome-terminal (vanilla, gnome-terminal-transparency, gnome-terminal-fedora, etc). If I have a command that stretches beyond one line, and I go back and delete anything, or type anything, the text gets all messed up. It's really hard to explain, but I have a video with screenkey showing the issue. Like, let's say I have the word "pacman" toward the beginning of the command, but it's longer than one line and I have to go back because I spelled pacman wrong, let's say I spelled it "pcaman." If I move my cursor back to pacman and try to erase the first "a", all the sudden it'll look like "pcaan", it'll get completely jacked up. Or if I add anything, let's say I have:

sudo pacman -S -needed .....

and I need to add the second hyphen to make it "--needed." well I'll go try to do that, and it'll still only have one hyphen, but now the n is gone. "-eeded." As I'm sure is obvious, this has caused many issues and on one occasion almost caused me to erase my entire /home directory if I hadn't caught it in time. I was going to remove a directory far within home, something like:

rm -r ~/.local/share/lutris/runners/wine/tkg-protonified-4.21

However when I went back to correct a spelling mistake, even though it wasn't rendered as such, in reality the tilda was separated from the forward slash, so it looked like this:

rm -r ~ /.local/share/....

And as you all know, "~" by itself is read as home. When the command took more than a couple seconds, I was like "wait a minute," and canceled it, hit the Up arrow to see what command actually got input, and sure enough, that's what had happened and I had lost a bunch of stuff, but luckily got it all back after tracking all the missing stuff down, which was rough since I don't think there's any way of actually finding out what files had been deleted through logs or anything. I've searched high and low for "terminal font rendering issues", but every result I could find was related to either not using a monospace font, or not having the correct font installed to render unicode characters. I mentioned this issue in passing on DistroTube's live stream yesterday, and one other person had said they had had my issue before, but they didn't know any way to fix it, aside from zooming out and zooming back in in the terminal, which does seem to fix it most of the time, more so on kitty than on gnome terminal.

inxi -Gxxz:

Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 
  vendor: XFX Pine driver: amdgpu v: kernel bus ID: 07:00.0 
  chip ID: 1002:67df 
  Display: x11 server: X.Org 1.20.6 driver: amdgpu 
  unloaded: modesetting,vesa alternate: ati,fbdev compositor: compton 
  resolution: 1366x768~60Hz, 1920x1080~60Hz 
  OpenGL: renderer: Radeon RX 580 Series (POLARIS10 DRM 3.35.0 
  5.4.6-arch3-1 LLVM 9.0.0) 
  v: 4.5 Mesa 20.0.0-devel (git-3409c06e26) direct render: Yes 

Video demonstrating the issue


It seems the issue is with color syntax highlighting in zsh.


EDIT: This is not an issue with syntax highlighting in zsh, or an issue with zsh at all. I don't use bash (except for shell scripts), and I just switched over to bash to test if this issue persisted. It does. The same exact thing happens in bash as in zsh, if the text is more than one line, it gets all screwed up if you try to edit anything. Like I said, other people with issues somewhat similar had their issues seemingly caused by color settings in their terminal. I don't use anything like oh-my-zsh for bash, and my bash is literally the default vanilla bash configuration. There are no color settings or any customization done whatsoever.

Last edited by gardotd426 (2020-01-07 22:07:04)

Offline

#2 2019-12-30 21:04:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [UNSOLVED]Weird Font Issues if Text is More than One Line in Terminals

Likely your prompt is unescaped/broken.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-12-30 23:38:09

gardotd426
Member
Registered: 2019-10-19
Posts: 48

Re: [UNSOLVED]Weird Font Issues if Text is More than One Line in Terminals

So forgive me if I'm wrong (newbie corner and all that), but would that mean there's nothing I can do aside from zooming in and out? I don't have any custom/PS1/color-type stuff set, however I am using oh-my-zsh with its built-in syntax highlighting, but obviously I would have no idea how to actually edit any oh-my-zsh code. The only things I could find through searching for broken zsh prompts seem to be for people with similar problems but they all have PS1/colors that were unescaped in there .zshrc, but I don't have anything unescaped, the only colors I have set are the zsh syntax highlighting.

Offline

#4 2019-12-30 23:50:51

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [UNSOLVED]Weird Font Issues if Text is More than One Line in Terminals

Stop using oh-my-zsh. It causes more problems than it solves.

Offline

#5 2019-12-31 00:10:57

gardotd426
Member
Registered: 2019-10-19
Posts: 48

Re: [UNSOLVED]Weird Font Issues if Text is More than One Line in Terminals

2ManyDogs wrote:

Stop using oh-my-zsh. It causes more problems than it solves.

I've never had a problem with it, and it's saved me a ton of time, however I DO see how this could be a very valid point, and it appears that this does have something to do with my issue. Marking as solved, problem with syntax highlighting in oh-my-zsh. Thanks guys.

Offline

#6 2020-01-07 22:07:42

gardotd426
Member
Registered: 2019-10-19
Posts: 48

Re: [UNSOLVED]Weird Font Issues if Text is More than One Line in Terminals

Turns out, it was nothing to do with oh-my-zsh or zsh whatsoever. I don't use bash (except for shell scripts), and I just switched over to bash to test if this issue persisted. It does. The same exact thing happens in bash as in zsh, if the text is more than one line, it gets all screwed up if you try to edit anything. Like I said, other people with issues somewhat similar had their issues seemingly caused by color settings in their terminal. I don't use anything like oh-my-zsh for bash, and my bash is literally the default vanilla bash configuration. There are no color settings or any customization done whatsoever.

Offline

#7 2020-01-08 12:51:29

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,455

Re: [UNSOLVED]Weird Font Issues if Text is More than One Line in Terminals

Your list of tried terminals/distros kinda suggests you are using gnome.
Have you tried other WM/DE like openbox to verify whether the issue is gnome-specific ?

Does xterm also exhibit this behaviour ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB