improve previous line count
See original GitHub issueThe previous line count is being tracked by log-update
but it does not take the terminal size into account.
For instance, if you log a line of 40 characters while the terminal is only 30 characters, it will be printed on 2 lines. After calling log-update
again, it will only erase the 2nd line because the previous line count was only 1 and not 2.
So we have to iterate over all the lines here and calculate the number of printed lines instead.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:15 (13 by maintainers)
Top Results From Across the Web
Count number of lines of output from previous program
The problem is, the program takes a long time to run, and I want to display the output to the user. Is there...
Read more >Fastest way to count number of lines? - Stack Overflow
Now allocate a buffer of that size and read (using read or fread ) blocks of that size. Then iterate this in-memory block...
Read more >Add or remove line numbers - Microsoft Support
For more advanced line numbering options, such as numbering at different intervals, click Line Numbering Options, and then click Line Numbers on the...
Read more >How to Count Lines of Code: A Complete Overview | LinearB
In this post, we'll discuss the importance of counting lines of code including how to use VS code counter, cloc, and xargs.
Read more >Python Count Number of Lines in a File [5 Ways] - PYnative
Set counter to zero · Use a for-loop to read each line of a file, and if the line is nonempty, increase line...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Feel free if you have time 😃.
@SamVerschueren yes I have tested it but it does not fix the issue, testing #16 gives the following final output in cmder in Windows 10:
And in command prompt in windows 10:
My fix above gives the following output in cmder in Windows 10:
And in command prompt in windows 10: