Consider changing null cell data to all zeros
See original GitHub issueOn resize when the cols in the terminal increases, we fill in cell data at the end of the buffer here:
This is doing a relatively large amount of work as each individual index of the cell needs to be set directly off the cell object:
If we made “null cell data” all zeroes, we could then use a single typed array fill call, at least when the fill data is all default background and foreground colors which is the typical case.
This would involve either adapting the code so null cells have a width of 0 instead of 1, or change a cell’s width=1 to actually be encoded as 0 << Conten.WIDTH_SHIFT
:
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Replace NULL or Missing Data With Zeros or Existing Data
All options will replace NULL data with zeros. Options 3, 4, and 5 will replace missing data with zeros. Options 2, 3, and...
Read more >How to Replace Blank Cells in Excel with Zeros (0), Dashes (-)
Select Blanks in the Go To Special dialog box and click OK. Excel will select all of the blank cells within the range....
Read more >Transform NULL and N/A cells into blank or zero or deleting ...
Looking answer related to the situations when: Transforming NULL and N/A cells into blank or Transforming NULL and N/A cels into zero.
Read more >How to Replace Zeros with Blank Cells in an Excel Worksheet
The easy way to find and fix zeros or any other value is with Excel's Find/Replace function. Open your worksheet and either 1)...
Read more >How to Replace Blank Cells with Zeros in Excel Pivot Tables
Right-click any cell in the Pivot Table and select Pivot Table Options. · In Pivot Table Options Dialogue Box, within the Layout &...
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 FreeTop 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
Top GitHub Comments
Yeah - that summarizes it pretty well, sadly. And putting such a hack in place is dangerous, in several months no ones remembers exactly it was all about and boom 🙈
Ah well I meant it this way - if we just fill all excess uint32 slots from current NULL_CELL.CONTENT value it should just work, because it will just contain (1<<22) in all slots, thus also for FG and BG, where it is technically wrong. But it is not harmful, as the FG/BG value dont eval the lower 3 bytes (RGB section, thus bit 1…24) since
CM_MASK
is zero. (For CM_MASK==0 the RGB section has no meaning in FG/BG.) I know thats quite hacky, thus my warning about a proper doc note, if we’d go that route.In summary we’d only need to do: