Long lines truncated when removing indentation using Alt + vertical selection + Backspace in JupyterLab

I encountered a reproducible issue in JupyterLab when editing Python/Sage code blocks with multiple indentation levels.

Steps to reproduce:

  1. Paste a block of code containing several indentation levels into a JupyterLab notebook.

  2. Hold Alt, drag the mouse vertically to select indentation columns.

  3. Press Backspace to remove the indentation.

  4. Long lines are truncated (the end of the line disappears).

This only happens in JupyterLab (CodeMirror).
If I perform the same operation in Notepad++, the lines are never truncated.
If I remove indentation in Notepad++ and paste back into JupyterLab, everything works.

Additional notes:

  • The issue persists even with Line Wrap = Off.

  • The problem is more frequent when the editor area is narrow (e.g., sidebar open).

  • Environment:

    • JupyterLab 4.5.6

    • Browser: Microsoft Edge

    • OS: Windows 11 + WSL2 (Ubuntu 24.04)

    • Notebook: SageMath (SageLab)

It looks like a CodeMirror vertical‑selection bug affecting long lines.

Is this a known issue? Should I open a GitHub ticket?

I cannot reproduce this with default ipython kernel on jupyterlab 4.6.2 no matter how narrow and no matter the line wrap setting.

If you can reproduce with JupyterLab 4.6.2 then a GitHub issue is the way to move it forward. Ideally with a snippet that can be copy-pasted and a recording to confirm reproduction steps.