Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Glitch, visual bug, the whole screen breaks, resize does something, redraw does not #1866

Open
6 of 9 tasks
alexNecroJack opened this issue Apr 10, 2024 · 0 comments
Open
6 of 9 tasks
Labels

Comments

@alexNecroJack
Copy link

alexNecroJack commented Apr 10, 2024

Environment details (Put x in the checkbox along with the information)

  • Operating System: CentOs7 (CloudLinux 7.9)
  • Desktop Environment:
  • Terminal Emulator: tmux
  • Shell: bash
  • Custom desktop opener (if applicable):
  • Program options used: (See bashrc below)
  • Configuration options set: (See bashrc below)
  • Plugins are installed
  • Issue exists on nnn master

~/.bashrc:

nn ()
{
  # Block nesting of nnn in subshells
  [ "${NNNLVL:-0}" -eq 0 ] || {
    echo "nnn is already running"
    return
  }
  
  export NNN_OPTS="HucUAd" #c option should use the hashbang... On the contrary it even tries to open images!! I don't know if it tries with bash or whatever...
  export NNN_OPENER=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/passive/nuke
  export NNN_CLI_ONLY=1
  export NNN_PLUG='f:finder;b:amasis_backup_files_suffixer;c:cd;0:passive/amasis_startup'
  export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
  export NNN_TRASH=1
  
  # The command builtin allows one to alias nnn to nn, without making an infinitely recursive alias
  command nnn -P0 "$@"

  [ ! -f "$NNN_TMPFILE" ] || {
    . "$NNN_TMPFILE"
    rm -f "$NNN_TMPFILE" > /dev/null
  }
}
export -f nn
# endregion

# Check for interactive shell
# Terminal is the default for many cases, even for SFTP!!
# So in order for everything to work, for example SFTP,
# we need to check first that the terminal is interactive,
# meaning, that we are in a for-user shell.
if [[ $- == *i* ]]; then # Check for interactive shell
  
  if [ -z "$TMUX" ]; then # Not inside tmux
    session_name="$(whoami)_$(date '+%Y-%m-%d %H-%M-%S')" # Generate a unique session name
    tmux new-session -s "$session_name"
  else # already inside tmux
    nn
  fi
  
fi

I access the terminal through:

  • Windows
  • V.Code terminal
  • V.Code SSH

And then tmux opens, and NNN.

When it happened, I could reproduce it, with the steps presented below. Then I tried to kill tmux and go bare terminal,
and it stopped happening even with tmux... really, I don't know how to reproduce it right now.
I could before 5 minutes with the steps below.

Exact steps to reproduce the issue

Open a terminal with Ctrl-~ in VCode:
Clip_204145

Drag the terminal up to make it as editor (therefor resizing the terminal) :
Clip_204146
Everything seems okay so far..

Open help (Shift /) :
Clip_204147
Woah! ... something died..

Close help:
Clip_204148
wow ... all those quota.user? They definately don't exist

This is me moving the cursor (arrow keys down) to the entry below "bin":
Clip_204149
which is as we see (multiple times) "boot"

This is me moving the cursor (arrow key down) to the entry below "boot":
Clip_204150
which is as we see (multiple times) "dev" (not "devta.user")

Ant this is the result after moving the cursor a lot (up / down arrows)
Clip_204152

I tried redrawing the screen in tmux multiple times, no luck
(refresh-client -l) (C-b r)
and I even tried the ^L of NNN (Ctrl Shift l / Ctrl l / Shift L)
and nothing changed.

After resizing the VCode window (and therefore I guess resize is being propagated) it seems like it's fixed...
But I can easily see the problem persists, by typing / to filter, and typing an (existing) letter... Everything get's corrupted again...

I will install the latest NNN and try it there too.
Although now that I can not persistently recreate it, I might take a week to provide more info.
Don't worry though, it's happening at least once a week, the past 3-4 months or so for sure.

It would be nice to have a config option, to skip smart redrawing, and force it to full redraw..
I am thinking to myself, rather than having some performance boost, we are on a Web server machine, I think it can handle full redraws, but the buuug.... it's not okay.

Thanks for this MAGNIFICENT program, it's one of the BEST I have ever seen :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant