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

Screen not cleaned up properly (Windows build from source) #232

Open
cpkio opened this issue Apr 11, 2023 · 5 comments
Open

Screen not cleaned up properly (Windows build from source) #232

cpkio opened this issue Apr 11, 2023 · 5 comments

Comments

@cpkio
Copy link

cpkio commented Apr 11, 2023

Describe the bug
Screen is not cleared up when switching between slides.

To Reproduce
Set the terminal to 80×18 (big font size), load this sample (random text):

---
author: "Bugs demo"
date: "dd.MM.YYYY"
paging: "%d / %d"
---

# Только сложившаяся структура организации станет частью наших традиций

* Внезапно, непосредственные участники технического
  прогресса являются только методом политического
  участия и своевременно верифицированы.

* Вот вам яркий пример современных тенденций —
  дальнейшее развитие различных форм деятельности
  играет важную роль в формировании поставленных
  обществом задач.

* Имеется спорная точка зрения, гласящая примерно
  следующее: тщательные исследования конкурентов
  являются только методом политического участия
  и ограничены исключительно образом мышления.

---

# Убеждённость некоторых оппонентов расставила все точки над i

* В своём стремлении повысить качество жизни, они
  забывают, что новая модель организационной
  деятельности играет важную роль в формировании
  соответствующих условий активизации.

* Вот вам яркий пример современных тенденций —
  семантический разбор внешних противодействий
  позволяет оценить значение соответствующих условий
  активизации.

Expected behavior
Expected to see no text from previous slide on next one.

Screenshots

2023-04-11_131430

2023-04-11_131437

(the header and the first line of the first slide leaked to the second)

Desktop (please complete the following information):

  • OS: Windows x64 (built from source)
  • Version: latest (77e7a9e)
@Delta456
Copy link
Contributor

I can reproduce the same on Linux using kitty terminal.

@hotbrightsunshine
Copy link

I am experiencing this issue too. I fear this has to do with the usage of the \t character. When using a code block (three backticks), using \t will always issue this problem. When rendering normal text, screen is not correctly cleared when using a \t. Some pattern I noticed:

```
\t
```

will always clear wrongly.

hello\t	with tab 

Using a \t inside a string is problematic, but using it at the beginning of the line is not. End of line doesn't seem to be a problem.

I am using slides under Linux Mint, with Gnome Terminal, and under Fedora with Gnome Terminal too.
I am not familiar with Go programming language, but I might take a look at the source code to see if there is any problem regarding what I said.

@XiaoPengYouCode
Copy link

I find a same problems, if this page has content and the corresponding position of the previous page is blank, when I return to the previous page, the content of the corresponding position of this page will be retained, my command line environment is gnome42.9

@gamebox
Copy link

gamebox commented Mar 12, 2024

Seeing the same thing on macOS Sonoma with Alacritty. Removing all tabs from inside code blocks resolves the issue

@gamebox
Copy link

gamebox commented Mar 12, 2024

I wonder if swapping these two lines in internal/model/model.go:210-211 would fix the issue?

slide, err := r.Render(slide)
slide = strings.ReplaceAll(slide, "\t", tabSpaces)

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

No branches or pull requests

5 participants