-
Notifications
You must be signed in to change notification settings - Fork 13
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
an issue with clear buffer #26
Comments
This is a good catch. On the other hand, I would suggest you reset the cursor position to (0, 0) after clearing the buffer to avoid the cursor position surprising you. |
thanks, clear buffer now works. another issue happens when the initial command fails. i get the following: File ~/.local/lib/python3.8/site-packages/termqt/terminal_widget.py:545 in _stdout File ~/.local/lib/python3.8/site-packages/termqt/terminal_buffer.py:1378 in _stdout_string File ~/.local/lib/python3.8/site-packages/termqt/terminal_buffer.py:1051 in write_at_cursor File ~/.local/lib/python3.8/site-packages/termqt/terminal_buffer.py:1027 in write IndexError: list assignment index out of range |
I also modified the last lines of start.py to test the functionality of clear_buffer. no exceptions happens but in the terminal the current dir is shown twice.
Terminal looks like
|
Great to know! Thanks again! |
Regarding the new issue of lines being displayed twice, I would think it is an issue with the shell itself (since the shell doesn't know the buffer is cleared). I may look into it a bit more today. |
Thanks, another problem is with command top. the output not shows the apps running |
oh i realized that there is no problem with command top but the font is black similar to the background. |
Why the foreground color is black in your case? I believe the default color is white. Can you investigate this? |
my foreground is white. when i execute top command in the bash, the summary of my resources are shown as white, but the processes have black font color |
1. Implemented `CSI d` (set cursor vertical absolute) command, 2. Correctly deals with `CSI m` with no arguments (means reset all styles), 3. Correctly recognizes `ESC ( <rest>` (select G0 charset) and discard it. I don't think G0 charset selection will be needed in modern cases. Fixed #26.
I see. The issue is caused by the broken support for some escape sequences. I have pushed a new commit to #27. Would you have a look? |
1. Implemented `CSI d` (set cursor vertical absolute) command, 2. Correctly deals with `CSI m` with no arguments (means reset all styles), 3. Correctly recognizes `ESC ( <rest>` (select G0 charset) and discard it. I don't think G0 charset selection will be needed in modern cases. Fixed #26.
I have used termqt in a tab inside a qdialog. whenever i reopen the dialog i use terminal.clear_buffer() to clear the screen but after some tries i get the following errors:
Traceback (most recent call last):
File ~/.local/lib/python3.8/site-packages/termqt/terminal_widget.py:658 in resize
self.resize(self.size().width(), self.size().height())
File ~/.local/lib/python3.8/site-packages/termqt/terminal_widget.py:451 in resize
self._save_cursor_state_stop_blinking()
File ~/.local/lib/python3.8/site-packages/termqt/terminal_widget.py:527 in _save_cursor_state_stop_blinking
self._switch_cursor_blink(CursorState.ON, False)
File ~/.local/lib/python3.8/site-packages/termqt/terminal_widget.py:522 in _switch_cursor_blink
self._paint_cursor()
File ~/.local/lib/python3.8/site-packages/termqt/terminal_widget.py:416 in _paint_cursor
c = self._buffer[ind_y][chr_x]
IndexError: deque index out of range
QPainter::begin: A paint device can only be painted by one painter at a time.
QPainter::setPen: Painter not active
QPainter::setFont: Painter not active
The text was updated successfully, but these errors were encountered: