-
Notifications
You must be signed in to change notification settings - Fork 785
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
(feature request) Output/messages #180
Comments
Also, a similar request; would it be possible to assign fixed widths to columns? Regards, |
Thanks, will do! :)
Sadly no, see #59 for the reason why. What you can do instead is to use a separate terminal for the dashboard.
In what other places do you believe this is necessary? Using fixed columns for the opcodes basically means to potentially trim some of them, what's the use of having partial opcodes? |
I see, that's a shame. Thanks for the speedy reply!
Well, I was thinking of setting the width of the columns to the maximum potential widths, since I generally have columns to spare in that module... another option would be to move the column to the furthest right so that the variance in the width can't affect any of the neighbouring columns (assuming it doesn't linebreak). But then again, I rarely need it so I could just turn it off, but it could be nice to be able to assign some fixed widths for columns when applicable. Maybe have a format string for an assemble line or something? If not, it's not the end of the world :) Happy New Year! Regards, |
This is somewhat related to #178, yet in the other dimension. I'll think about it, thanks for the suggestion.
All the best! |
I take it #59 is also why we can't scroll back up and see earlier output? Even just not clearing the screen so i could use my terminal scroll buffer? |
@karlp You should be able to scroll up, but by default the scroll back buffer is discarded at each redraw so to only show one dashboard unless the
|
Thanks, that works! |
Hi, @cyrus-and, your project is amazing! I found it very useful for my debugs. In this thread you mentioned that scrollback can be activated, I use it and I am curious if we can keep the layout of output by calling In this case, it will not dump the previous output (so we can scroll back) and put the new output at the top of the screen What do you think? |
Hi @PovelikinRostislav, glad to hear that!
Hmm, what do you mean? Can you clarify a bit? |
Sure, let me try to clarify. If we set up
This last bullet is kind of reverses the layout - new output now is observed at the bottom part of the screen. At the same time, I noticed that with If the dashboard can redraw the current state, calling before it the same cmd as
I hope it clarifies my thoughts |
Hmm, when
All this is scrollable, according to your terminal and that's the natural order. I do nothing to reverse the layout. Likewise I do nothing to intercept Also notice that the dashboard is not a curses application, the only way to redraw its status is to print another instance, thus causing another |
Thanks for quick replies and detailed explanation. Sorry for confusion when I used "reverse" to describe the state. I meant it only in a logical way. When If dashboard sends |
Actually it all goes to the following changes: @staticmethod
def clear_screen():
# ANSI: move the cursor to top-left corner and discard the scrollback if set
return '\x1b[H\x1b[J' + '\x1b[3J' if R.discard_scrollback else '\x1b[H\x1b[J' What do you think of this? |
Oh I see what you mean, I guess we could simply put the parenthesis around the return '\x1b[H\x1b[J' + ('\x1b[3J' if R.discard_scrollback else '') Feel free to file a PR if you want. |
Hey @cyrus-and, I used our change today and noticed that this sequence of symbols To showcase the incorrect behavior, here are two screenshots of the case with
In comparison, what we see after the Also I made some experiments to send the return '\033[2J' + ('\x1b[3J' if R.discard_scrollback else '') The result is way different and still not what we want. It clears the screen, but cursor is kept on the bottom. Thus, when we print new status - it produces one empty screen after the previous. In this case the history becomes with big holes between statuses Here are the sample screenshots: |
Right, it doesn't work as intended... I think I fixed it in 0a5335d. What do you think?
These are ANSI sequences, read more here. Also you can inspect what
Instead
|
Nice, I like it. Thank you a lot for your time, explanation and the links! |
Hi, I love the extension -- keep up the awesome work!
A couple thoughts:
Is it possible to make the "Output/messages" into a module that can be customized?
In particular, the possibility of the pre-allocating N lines for output (akin to height in assembly and source) as well as the option of scrolling it (again, akin to assembly and source) would be great since it can be quite distracting if the line count changes during stepping (since it will push the rest ouf the dashboard up or down). Being able to redirect the "Output/messages" to a separate TTY would work as well. In that case I can just make a separate tmux pane that I can resize and scroll, so for me that would solve my other issue as well.
P.S. If either of these things are possible already and I've somehow missed them I apologize in advance! D.S.
The text was updated successfully, but these errors were encountered: