Menu

#49 unexpected highlighting/selection

1.6
open
nobody
None
2026-02-20
2026-02-20
SweetTyler
No

It’s strange, but I suspect it may be related to the “File Modified” dialog that pops up.

Steps to reproduce (on Linux):

1) Compile the following C code and run the generated executable (for example, "printsomething"). Redirect the output to a file (for example, "aa") using command "printsomething > aa".

#include <stdio.h>
#include <unistd.h>
#include <time.h>

int main()
{
    struct timespec ts;
    ts.tv_sec = 0;
    ts.tv_nsec = 200000000;   // 200 million ns = 0.2 seconds

    for (int i = 0; i < 10000; i++) {
        printf("Loop iteration ...................................... %d\n", i);
        fflush(stdout);
        nanosleep(&ts, NULL);
    }
    return 0;
}

2) Open another terminal and launch xnedit to open the file "aa".

3) Click anywhere in the file and wait for the “File has been modified” dialog to appear. Click the “Reload” button, then scroll the mouse wheel slowly (not too slow).

You will very likely notice that while scrolling, some text becomes selected and highlighted as shown in the attached screenshot.

Discussion

  • SweetTyler

    SweetTyler - 2026-02-20

    Here is the snapshot.

     
  • SweetTyler

    SweetTyler - 2026-02-20

    My system is Fedora 43. Xnedit source code is the latest version downloaded from GitHub.

     

Log in to post a comment.

MongoDB Logo MongoDB