CmpBuffers black screen

39 views
Skip to first unread message

Tom Collins

unread,
May 26, 2026, 5:47:25 PMMay 26
to SemWare TSE Pro Text Editor
I know Carlo did this macro, but since it's part of TSE-proper these days I thought I'd post this bug here.  For me, CmpBuffers doesn't initially show both of the compared files.

1. Load two files into TSE.
2. Util->Potpourri->CmpBuffers
3. Compare the only 2 buffers

This splits the screen vertically with the two files.  On the left (the inactive pane), the file is shown normally.  On the right (the active pane), the display is all black.  Flailing around, I can sometimes get the right side to refresh.

I note that the CmpBuffers configuration is set with "Selected" as "Black on Black" and "with syntax highlighting" as "No".  Same thing for "Other".  I didn't configure any of these that I recall.

I also note that when I hit 'M' inside of the macro, I get a warning: "Program error: Unknown action "".

TSE 4.50.19.

Thanks!

Carlo Hogeveen

unread,
May 26, 2026, 7:29:51 PMMay 26
to sem...@googlegroups.com

Hi Tom,

Let's start with the last and easiest problem.

You wrote:
> I also note that when I hit 'M' inside of the macro, I get a warning: "Program error: Unknown action "".

While comparing, cmpbuffers only understands its own keys.
Any other key returns the error you mentioned.
While comparing, the <K> key lists and configures which keys do which actions.
The <K> key should be listed in the help line.
You can exit cmpbuffers with the <Escape> key.

Your color/refresh problems baffle me.
I did a fresh install of the Windows and Linux variants of TSE v4.50.19, and could not reproduce your color/refresh problems.
Default the <Alt CursorUp> key positions both files on the first difference, and the <Alt CursorRight> and <Alt CursorLeft> keys jump to the beginning or end of the next or previous difference.

To start off on a common base, could you also do a fresh install of TSE to a new directory and see if cmpbuffers has color/refresh problems there too?
That would help a lot narrowing down where the cause could be.
Do you perhaps use a specific TSE color scheme, as configurable in TSE's color options?
And which OS (version) are you using?

Carlo
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mailto:semware+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/semware/CAODxuOZ9awj%3D%2B%3DS%3DXV1J-Q1pF5hBG%3Dd4KC3fwmKsaauG6FS-Pg%40mail.gmail.com?utm_medium=email&utm_source=footer.

Tom Collins

unread,
May 27, 2026, 10:44:48 AMMay 27
to sem...@googlegroups.com
Ok, I spent some more time looking at this:

1. I had misundestood the keys, and was thinking that 'M' was the main menu key rather than 'K'.  Since I have the status line off, I forgot which keys were which.  Possible improvement: if status line is off when CmpBuffers starts, pop up a window mentioning 'K' and Esc.

2. Yea, it looks like all of my settings were set to strange values, including the colors.  Setting the colors to something normal fixed the black-screen problem.

3. To the "Program error: Unknown action " message - that's pretty jarring and confusing to the user.  I wonder if Sammy has a workaround?

4. It seems like the comparison works differently the first time invoked.  Two files: test1.txt and test2.txt:

--- test1.txt: ---
{
    "nodes":[
        {                                                                                                                                              
            1,                                                                                                                                          
            2,                                                                                                                                          
        },                                                                                                                                              
        {
            3
        }
    ]                                                                                                                                                  
}

-- test2.txt ---
{
    "nodes":[
        {                                                                                                                                              
            1,                                                                                                                                          
            2,                                                                                                                                          
        }                                                                                                                                              
    ]    
}  

Load both files, with one window containing test1.txt.  CmpBuffers, vertical split.  Default TSE install. 

a. When the window splits, test1.txt, which was "current", moves to the right pane.  I'd expect left.
b. All of test1.txt is highlighted as different.
c. Escape to exit CmpBuffers, window configuration doesn't restore to a single file, but remains split with the highlights shown as-is.
d. If I switch back to an un-split window with test1.txt shown and re-run CmpBuffers, the diffs are shown correctly.

Thanks!

Tom

To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/semware/002a01dced67%248b5462d0%24a1fd2870%24%40ecarlo.nl.

Carlo Hogeveen

unread,
May 27, 2026, 1:21:07 PMMay 27
to sem...@googlegroups.com

> 1:
An extra pop-up window at start-up would get annoying, so I will not do that as a solution.
I cannot blindly overrule TSE's HelpLine being off, because another user might prefer the extra compared line that provides.
My idea is to give cmpbufers its own helpline on/off configuration, default being on.

> 2:
Glad you could fix the colors locally.

> 3:
I totally agree that is a stupid and confusing error message. My bad. Sorry.
My plan is to change it to change it to something like "Ignored: Key <key> is not a cmpbuffers key.".
And perhaps to make it a temporary pop-up instead of a persistent warning that needs an OK.

> a. When the window splits, test1.txt, which was "current", moves to the right pane.
> I'd expect left.
Point: After cmpbuffers starts, the cursor is still in the current file.
That said, about making the current file the left one:
Subjectively I share your expectation. I will think about it.

> 4. b and d:
I cannot reproduce that.
This might be another cmpbuffer setting that somehow got mangled on your computer.
Try configuring cmpbuffers, and set "Minimum matching lines" to 2.
You can even temporarily change this setting while comparing by pressing keys <2> to <9> interactively.

> 4.c:
> Escape to exit CmpBuffers,
> window configuration doesn't restore to a single file, but remains split

That is intentional. I will think about this. Maybe make it a configuration option.

> with the highlights shown as-is.

Yeah, that is neither pretty nor useful.
I will see what I can do.

I got some great feedback from your points.
Thanks!

Carlo



Tom Collins

unread,
May 27, 2026, 3:12:25 PMMay 27
to sem...@googlegroups.com
1. Yea, I wouldn't propose just turning on the helpline.  I was suggesting one of the standard CmpBuffers popups for a second or two if the helpline was off when the macro was invoked.  I note that CmpFiles seems to open a partial status line when it runs.

3. I'd just ignore keys that aren't active.  No need to complain about them.

4b and 4d.  I'm able to reproduce this on a default Linux install with minimum matching lines of 2.  TSE 4.50.19.

4c. I'd say no configuration option - just whatever behavior you think is most useful.  My mental assumption was that CmpBuffers was something that I was running to do some work for me, and that when it was done I'd be back to the editing session I was doing.

Glad to help!

--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Guy Rouillier

unread,
May 28, 2026, 3:15:22 AMMay 28
to sem...@googlegroups.com
On Wed, 2026-05-27 at 19:21 +0200, Carlo Hogeveen wrote:
> That said, about making the current file the left one:
> Subjectively I share your expectation. I will think about it.

Interesting fact. Because most computer technology was developed in Western
countries, we make assumptions about text progressing from left to right and
top to bottom. But that tradition is not universal. Hebrew is read right-to-
left, top to bottom. And East Asian languages (Japanese, Chinese and Korean)
is read top-to-bottom, right-to-left. According to Google, the same East
Asian languages are rendered on computer screens using the Western format,
left to right, top to bottom. Because web content is a mixture of text and
graphics, attempting to revert to traditional top to bottom would garble the
content.

I personally would have difficulty switching between left to right and top to
bottom. I occasionally do it with word puzzles, but the going is slow and
takes effort.

--
Guy Rouillier

Carlo Hogeveen

unread,
May 29, 2026, 7:15:27 AMMay 29
to sem...@googlegroups.com

Feedback welcome about CmpBuffers behaving differently at its start-up.

When CmpBuffers starts up, there is no current "Selected" difference, but other differences are hilited with the "Other" color.
This is distinguishable when CmpBuffers has different colors configured for "Selected" and "Other" colors.

This was intentional.
My thinking was that CmpBuffers starts up at the same old cursor position, and then the user gets to decide whether to browse up or down for differences from there, or to browse to the first or last difference.
On the other hand, (only) seeing "Other" differences at start-up can be confusing.

I still like my old reasoning, but maybe there is a better way?

I am pondering the following "solution".
At start-up CmpBuffers already temporarily pops up a window with the number of found differences.
I am contemplating extending that pop-up window with:
"Use the browse keys to select one."
And for non-helpline users I might as well extend it with a mention of the <F1>, <K> and <C> keys.

Carlo



Tom Collins

unread,
May 29, 2026, 10:55:27 AMMay 29
to sem...@googlegroups.com
I think we're talking about two different things.  What's confusing to me is the _difference_ in behavior in CmpBuffers the very first time you start it vs. subsequent invocations.  See the two screenshots with a new TSE 4.50.19 install on Linux.

1. tse/e test*.txt
2. Util->Potpourri->CmpBuffers, "Compare the only 2 buffers".  [Screenshot 1]
3. Esc.  Window->One.
4. Util->Potpourri->CmpBuffers, "Compare the only 2 buffers".  [Screenshot 2]

In the first screenshot, it seems like CmpBuffers is saying "I think these files are completely different."  In the second screenshot, it's saying "it's kinda different."  The second screenshot feels more correct to me.  See what you think.



--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
screenshot2.png
screenshot1.png

Carlo Hogeveen

unread,
May 29, 2026, 11:31:54 AMMay 29
to sem...@googlegroups.com

Tom,
I can reproduce that!
Your using a wildcard to open both files and me opening them separately makes a difference to the first subsequent CmpBuffers!
Thank you so much for taking the time to clarify this.
I am adding it to the list of possible CmpBuffers improvements I started to work on.

Carlo



Tom Collins

unread,
May 29, 2026, 2:00:42 PMMay 29
to sem...@googlegroups.com
Cool beans!  I appreciate the work on this enhancement to TSE.



--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Carlo Hogeveen

unread,
May 30, 2026, 7:37:29 AMMay 30
to sem...@googlegroups.com

As usual I will publish intermediate development versions on this web page:
https://ecarlo.nl/tse/InDevelopment.html

I make an exception mentioning this, because cmpbuffers' first development version fixes the most discussed bug, that cmpbuffers marks a whole file as different if files were loaded with wildcards.

Ideally the next mail about cmpbuffers with more improvements will be in a future release of TSE.

Carlo



Reply all
Reply to author
Forward
0 new messages