Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ftxui for openSUSE:Factory checked 
in at 2026-08-06 16:26:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ftxui (Old)
 and      /work/SRC/openSUSE:Factory/.ftxui.new.16738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ftxui"

Thu Aug  6 16:26:49 2026 rev:8 rq:1369977 version:7.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ftxui/ftxui.changes      2026-08-03 
17:18:08.056474883 +0200
+++ /work/SRC/openSUSE:Factory/.ftxui.new.16738/ftxui.changes   2026-08-06 
16:28:48.470251297 +0200
@@ -1,0 +2,13 @@
+Thu Aug  6 07:47:56 UTC 2026 - Michael Vetter <[email protected]>
+
+- Update to 7.0.3:
+  Bugfix:
+  * Fix incorrect mouse position in non-alternate-screen modes. The cursor
+    position request (used to convert mouse coordinates from screen space to
+    frame space) could be sent asynchronously, after the cursor had already
+    moved away from the frame's origin, causing the terminal's reply to be
+    misread as the wrong offset. Regressed by the 7.0.2 throttle fix, which
+    made the request's 500ms throttle actually engage for the first time. See
+    #1310.
+
+-------------------------------------------------------------------
@@ -4 +17 @@
-- Update to 7.02:
+- Update to 7.0.2:

Old:
----
  v7.0.2.tar.gz

New:
----
  v7.0.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ftxui.spec ++++++
--- /var/tmp/diff_new_pack.YtHqNJ/_old  2026-08-06 16:28:49.358282293 +0200
+++ /var/tmp/diff_new_pack.YtHqNJ/_new  2026-08-06 16:28:49.358282293 +0200
@@ -18,7 +18,7 @@
 
 %define         c_lib libftxui7
 Name:           ftxui
-Version:        7.0.2
+Version:        7.0.3
 Release:        0
 Summary:        A C++ library for terminal based user interfaces
 License:        MIT

++++++ v7.0.2.tar.gz -> v7.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/.github/workflows/abi_check.yaml 
new/FTXUI-7.0.3/.github/workflows/abi_check.yaml
--- old/FTXUI-7.0.2/.github/workflows/abi_check.yaml    2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/.github/workflows/abi_check.yaml    2026-08-06 
09:20:42.000000000 +0200
@@ -13,7 +13,7 @@
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
         with:
           fetch-depth: 0
 
@@ -66,7 +66,7 @@
           fi
 
       - name: Post comment
-        uses: marocchino/sticky-pull-request-comment@v2
+        uses: marocchino/sticky-pull-request-comment@v3
         with:
           path: abi_comment.md
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/.github/workflows/amalgamate.yaml 
new/FTXUI-7.0.3/.github/workflows/amalgamate.yaml
--- old/FTXUI-7.0.2/.github/workflows/amalgamate.yaml   2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/.github/workflows/amalgamate.yaml   2026-08-06 
09:20:42.000000000 +0200
@@ -37,7 +37,7 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Setup Cpp"
         uses: aminya/setup-cpp@v1
@@ -82,7 +82,7 @@
 
       - name: Upload Amalgamated Files
         if: matrix.name == 'Linux GCC'
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v7
         with:
           name: ftxui-amalgamated
           path: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/.github/workflows/build.yaml 
new/FTXUI-7.0.3/.github/workflows/build.yaml
--- old/FTXUI-7.0.2/.github/workflows/build.yaml        2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/.github/workflows/build.yaml        2026-08-06 
09:20:42.000000000 +0200
@@ -45,7 +45,7 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Build with Bazel"
         env:
@@ -93,11 +93,11 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: Get number of CPU cores
-        uses: SimenB/github-actions-cpu-cores@v1
+        uses: SimenB/github-actions-cpu-cores@v3
         id: cpu-cores
 
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Setup Cpp"
         uses: aminya/setup-cpp@v1
@@ -170,7 +170,7 @@
           ctest -C Debug --rerun-failed --output-on-failure;
 
       - name: Publish to codecov
-        uses: codecov/codecov-action@v4
+        uses: codecov/codecov-action@v7
         with:
           flags: ${{ runner.os }}
           name: ${{ runner.os }}-coverage
@@ -187,7 +187,7 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Setup Cpp"
         uses: aminya/setup-cpp@v1
@@ -230,7 +230,7 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Setup Cpp"
         uses: aminya/setup-cpp@v1
@@ -280,7 +280,7 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Setup Cpp"
         uses: aminya/setup-cpp@v1
@@ -291,7 +291,7 @@
           ninja: true
 
       - name: "Setup Python"
-        uses: actions/setup-python@v5
+        uses: actions/setup-python@v7
         with:
           python-version: '3.x'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/.github/workflows/conan.yaml 
new/FTXUI-7.0.3/.github/workflows/conan.yaml
--- old/FTXUI-7.0.2/.github/workflows/conan.yaml        2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/.github/workflows/conan.yaml        2026-08-06 
09:20:42.000000000 +0200
@@ -23,10 +23,10 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Setup Python"
-        uses: actions/setup-python@v5
+        uses: actions/setup-python@v7
         with:
           python-version: '3.x'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/.github/workflows/documentation.yaml 
new/FTXUI-7.0.3/.github/workflows/documentation.yaml
--- old/FTXUI-7.0.2/.github/workflows/documentation.yaml        2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/.github/workflows/documentation.yaml        2026-08-06 
09:20:42.000000000 +0200
@@ -14,7 +14,7 @@
     runs-on: ubuntu-latest
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
         with:
           fetch-depth: 0   # Need full history.
           fetch-tags: true # Need tags.
@@ -24,10 +24,10 @@
         uses: lukka/get-cmake@latest
 
       - name: "Install emsdk"
-        uses: mymindstorm/setup-emsdk@v7
+        uses: mymindstorm/setup-emsdk@v16
 
       - name: "Install Doxygen"
-        uses: ssciwr/doxygen-install@v1
+        uses: ssciwr/doxygen-install@v2
         with:
           version: '1.12.0'
 
@@ -66,7 +66,7 @@
           ../multiversion_docs/
 
       - name: "Deploy"
-        uses: peaceiris/actions-gh-pages@v3
+        uses: peaceiris/actions-gh-pages@v4
         with:
           github_token: ${{ secrets.GITHUB_TOKEN }}
           publish_dir: multiversion_docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/.github/workflows/publish.yaml 
new/FTXUI-7.0.3/.github/workflows/publish.yaml
--- old/FTXUI-7.0.2/.github/workflows/publish.yaml      2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/.github/workflows/publish.yaml      2026-08-06 
09:20:42.000000000 +0200
@@ -17,7 +17,7 @@
 
 jobs:
   publish:
-    uses: bazel-contrib/publish-to-bcr/.github/workflows/[email protected]
+    uses: bazel-contrib/publish-to-bcr/.github/workflows/[email protected]
     with:
       tag_name: ${{ github.event.inputs.tag_name }}
       registry_fork: ArthurSonzogni/bazel-central-registry
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/.github/workflows/release.yaml 
new/FTXUI-7.0.3/.github/workflows/release.yaml
--- old/FTXUI-7.0.2/.github/workflows/release.yaml      2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/.github/workflows/release.yaml      2026-08-06 
09:20:42.000000000 +0200
@@ -27,7 +27,7 @@
       upload_url: ${{ steps.create_release.outputs.upload_url }}
     steps:
       - name: "Create release"
-        uses: softprops/action-gh-release@v1
+        uses: softprops/action-gh-release@v3
         id: create_release
         with:
           draft: true
@@ -50,11 +50,11 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: Get number of CPU cores
-        uses: SimenB/github-actions-cpu-cores@v1
+        uses: SimenB/github-actions-cpu-cores@v3
         id: cpu-cores
 
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Install cmake"
         uses: lukka/get-cmake@latest
@@ -108,7 +108,7 @@
     runs-on: ubuntu-latest
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Create source package"
         run: >
@@ -127,7 +127,7 @@
     runs-on: ubuntu-latest
     steps:
       - name: "Checkout repository"
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: "Generate amalgamated files"
         run: ./tools/amalgamate.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/.github/workflows/shared_lib_build.yaml 
new/FTXUI-7.0.3/.github/workflows/shared_lib_build.yaml
--- old/FTXUI-7.0.2/.github/workflows/shared_lib_build.yaml     2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/.github/workflows/shared_lib_build.yaml     2026-08-06 
09:20:42.000000000 +0200
@@ -20,7 +20,7 @@
     runs-on: ${{ matrix.os }}
     steps:
       - name: Checkout repository
-        uses: actions/checkout@v4
+        uses: actions/checkout@v7
 
       - name: Configure CMake
         shell: bash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/CHANGELOG.md new/FTXUI-7.0.3/CHANGELOG.md
--- old/FTXUI-7.0.2/CHANGELOG.md        2026-08-01 17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/CHANGELOG.md        2026-08-06 09:20:42.000000000 +0200
@@ -4,6 +4,18 @@
 Next
 ====
 
+7.0.3 (2026-08-06)
+------------------
+
+### Component
+- Bugfix: Fix incorrect mouse position in non-alternate-screen modes. The
+  cursor position request (used to convert mouse coordinates from screen
+  space to frame space) could be sent asynchronously, after the cursor had
+  already moved away from the frame's origin, causing the terminal's reply to
+  be misread as the wrong offset. Regressed by the 7.0.2 throttle fix, which
+  made the request's 500ms throttle actually engage for the first time. See
+  #1310.
+
 7.0.2 (2026-08-01)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/CMakeLists.txt 
new/FTXUI-7.0.3/CMakeLists.txt
--- old/FTXUI-7.0.2/CMakeLists.txt      2026-08-01 17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/CMakeLists.txt      2026-08-06 09:20:42.000000000 +0200
@@ -30,7 +30,7 @@
 endif()
 project(ftxui
   LANGUAGES CXX
-  VERSION 7.0.2
+  VERSION 7.0.3
   DESCRIPTION "C++ Functional Terminal User Interface."
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/MODULE.bazel new/FTXUI-7.0.3/MODULE.bazel
--- old/FTXUI-7.0.2/MODULE.bazel        2026-08-01 17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/MODULE.bazel        2026-08-06 09:20:42.000000000 +0200
@@ -1,7 +1,7 @@
 # FTXUI module.
 module(
     name = "ftxui",
-    version = "7.0.2",
+    version = "7.0.3",
 )
 
 # Build dependencies.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/README.md new/FTXUI-7.0.3/README.md
--- old/FTXUI-7.0.2/README.md   2026-08-01 17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/README.md   2026-08-06 09:20:42.000000000 +0200
@@ -431,7 +431,7 @@
 include(FetchContent)
 FetchContent_Declare(ftxui
   GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
-  GIT_TAG v7.0.2
+  GIT_TAG v7.0.3
 )
 FetchContent_MakeAvailable(ftxui)
 
@@ -452,7 +452,7 @@
 ```starlark
 bazel_dep(
     name = "ftxui",
-    version = "7.0.2",
+    version = "7.0.3",
 )
 ```
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/bazel/test/MODULE.bazel 
new/FTXUI-7.0.3/bazel/test/MODULE.bazel
--- old/FTXUI-7.0.2/bazel/test/MODULE.bazel     2026-08-01 17:33:05.000000000 
+0200
+++ new/FTXUI-7.0.3/bazel/test/MODULE.bazel     2026-08-06 09:20:42.000000000 
+0200
@@ -6,7 +6,7 @@
     version = "0.0.1",
 )
 
-bazel_dep(name = "ftxui", version = "7.0.2")
+bazel_dep(name = "ftxui", version = "7.0.3")
 bazel_dep(name = "rules_cc", version = "0.2.17")
 
 local_path_override(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/doc/getting-started.md 
new/FTXUI-7.0.3/doc/getting-started.md
--- old/FTXUI-7.0.2/doc/getting-started.md      2026-08-01 17:33:05.000000000 
+0200
+++ new/FTXUI-7.0.3/doc/getting-started.md      2026-08-06 09:20:42.000000000 
+0200
@@ -21,7 +21,7 @@
 include(FetchContent)
 FetchContent_Declare(ftxui
   GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
-  GIT_TAG main # or a specific version like v7.0.2
+  GIT_TAG main # or a specific version like v7.0.3
 )
 FetchContent_MakeAvailable(ftxui)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/doc/installation_bazel.md 
new/FTXUI-7.0.3/doc/installation_bazel.md
--- old/FTXUI-7.0.2/doc/installation_bazel.md   2026-08-01 17:33:05.000000000 
+0200
+++ new/FTXUI-7.0.3/doc/installation_bazel.md   2026-08-06 09:20:42.000000000 
+0200
@@ -7,7 +7,7 @@
 
 **MODULE.bazel**
 ```starlark
-bazel_dep(name = "ftxui", version = "7.0.2")
+bazel_dep(name = "ftxui", version = "7.0.3")
 ```
 
 **BUILD.bazel**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/doc/installation_cmake.md 
new/FTXUI-7.0.3/doc/installation_cmake.md
--- old/FTXUI-7.0.2/doc/installation_cmake.md   2026-08-01 17:33:05.000000000 
+0200
+++ new/FTXUI-7.0.3/doc/installation_cmake.md   2026-08-06 09:20:42.000000000 
+0200
@@ -15,7 +15,7 @@
 
 FetchContent_Declare(ftxui
   GIT_REPOSITORY https://github.com/ArthurSonzogni/FTXUI
-  GIT_TAG v7.0.2  # Replace with a version, tag, or commit hash
+  GIT_TAG v7.0.3  # Replace with a version, tag, or commit hash
 )
 
 FetchContent_MakeAvailable(ftxui)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/doc/installation_meson.md 
new/FTXUI-7.0.3/doc/installation_meson.md
--- old/FTXUI-7.0.2/doc/installation_meson.md   2026-08-01 17:33:05.000000000 
+0200
+++ new/FTXUI-7.0.3/doc/installation_meson.md   2026-08-06 09:20:42.000000000 
+0200
@@ -88,7 +88,7 @@
 ```ini
 [wrap-git]
 url = https://github.com/ArthurSonzogni/FTXUI.git
-revision = v7.0.2
+revision = v7.0.3
 
 [provide]
 ftxui-screen = ftxui_screen_dep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/doc/installation_vcpkg.md 
new/FTXUI-7.0.3/doc/installation_vcpkg.md
--- old/FTXUI-7.0.2/doc/installation_vcpkg.md   2026-08-01 17:33:05.000000000 
+0200
+++ new/FTXUI-7.0.3/doc/installation_vcpkg.md   2026-08-06 09:20:42.000000000 
+0200
@@ -14,7 +14,7 @@
   "dependencies": [
     {
         "name": "ftxui",
-        "version>=": "7.0.2"
+        "version>=": "7.0.3"
     }
   ]
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/src/ftxui/component/app.cpp 
new/FTXUI-7.0.3/src/ftxui/component/app.cpp
--- old/FTXUI-7.0.2/src/ftxui/component/app.cpp 2026-08-01 17:33:05.000000000 
+0200
+++ new/FTXUI-7.0.3/src/ftxui/component/app.cpp 2026-08-06 09:20:42.000000000 
+0200
@@ -196,33 +196,26 @@
       }
 
       const auto now = std::chrono::steady_clock::now();
-      const auto delta = now - last_request_time_;
-      const auto delay = std::chrono::milliseconds(500) - delta;
-
-      if (delay <= std::chrono::milliseconds(0)) {
-        Send();
+      if (now - last_request_time_ < std::chrono::milliseconds(500)) {
+        // Too soon since the last request. Skip it: the request must be sent
+        // synchronously from Draw(), right after the cursor is moved to the
+        // frame's origin, so that the terminal's reply reflects that
+        // position. Draw() calls Request() again on the next frame, so the
+        // request isn't lost, only delayed.
         return;
       }
 
-      request_queued_ = true;
-      internal_->task_runner.PostDelayedTask(
-          [this] {
-            request_queued_ = false;
-            Request();
-          },
-          delay);
+      Send();
     }
 
     void OnReply() { pending_request_ = false; }
 
     bool HasPending() const {
-      if (pending_request_) {
-        const auto now = std::chrono::steady_clock::now();
-        if (now - last_sent_time_ < std::chrono::seconds(5)) {
-          return true;
-        }
+      if (!pending_request_) {
+        return false;
       }
-      return request_queued_;
+      const auto now = std::chrono::steady_clock::now();
+      return now - last_sent_time_ < std::chrono::seconds(5);
     }
 
    private:
@@ -240,7 +233,6 @@
         std::chrono::steady_clock::now() - std::chrono::hours(1);
     std::chrono::steady_clock::time_point last_sent_time_ =
         std::chrono::steady_clock::now() - std::chrono::hours(1);
-    bool request_queued_ = false;
   };
 
   ThrottledRequest cursor_position_request;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FTXUI-7.0.2/src/ftxui/dom/selection_test.cpp 
new/FTXUI-7.0.3/src/ftxui/dom/selection_test.cpp
--- old/FTXUI-7.0.2/src/ftxui/dom/selection_test.cpp    2026-08-01 
17:33:05.000000000 +0200
+++ new/FTXUI-7.0.3/src/ftxui/dom/selection_test.cpp    2026-08-06 
09:20:42.000000000 +0200
@@ -240,6 +240,59 @@
             "Lo\x1B[7mrem ipsum dolorUt e\x1B[27mnim ad minim       ");
 }
 
+// The next two tests drive a selection through `App`/`Loop` (press, move,
+// release, each in its own frame), then re-render the same document with a
+// plain `Selection` built from `screen.GetSelection()`'s row/column extent
+// to check exactly what got highlighted. `screen.CellAt()` can't be used
+// directly after `loop.RunOnce()`: `App::Internal::Draw()` clears its cell
+// buffer at the end of every frame (to build the next diff), so by the time
+// a test can inspect it, it's already back to defaults.
+
+// A selection built up over several separate frames (press, then one or
+// more moves, then release each processed in their own `loop.RunOnce()`)
+// must render the same thing as if it had been submitted all at once: the
+// first row from the start column to the end of the line, the last row from
+// the start of the line to the end column, and every row in between fully
+// selected (this is regular flow/text selection, not a rectangular block
+// selection -- see the pre-existing VBoxSelection/HBoxSelection tests).
+TEST(SelectionTest, SelectionAcrossMultipleFrames) {
+  // Each row is "0123456": column `x` holds the digit `x`.
+  const std::string content =
+      "0123456\n0123456\n0123456\n0123456\n0123456\n0123456\n0123456";
+  auto component = Renderer([&] { return text(content); });
+  auto screen = App::FixedSize(7, 7);
+  Loop loop(&screen, component);
+  loop.RunOnce();
+
+  screen.PostEvent(MousePressed(2, 2));  // local (1, 1)
+  loop.RunOnce();
+  screen.PostEvent(MouseMove(4, 4));  // local (3, 3)
+  loop.RunOnce();
+  screen.PostEvent(MouseMove(6, 6));  // local (5, 5)
+  loop.RunOnce();
+  screen.PostEvent(MouseReleased(6, 6));
+  loop.RunOnce();
+
+  EXPECT_EQ(screen.GetSelection(),
+            "123456\n0123456\n0123456\n0123456\n012345");
+
+  // Cross-check what actually gets rendered for that selection: row 1 from
+  // column 1 to the end, rows 2-4 fully selected, row 5 from the start to
+  // column 5.
+  auto element = text(content);
+  auto render_screen = App::FixedSize(7, 7);
+  Selection selection(1, 1, 5, 5);
+  Render(render_screen, element.get(), selection);
+  EXPECT_EQ(render_screen.ToString(),
+            "0123456\r\n"
+            "0\x1B[7m123456\x1B[27m\r\n"
+            "\x1B[7m0123456\x1B[27m\r\n"
+            "\x1B[7m0123456\x1B[27m\r\n"
+            "\x1B[7m0123456\x1B[27m\r\n"
+            "\x1B[7m012345\x1B[27m6\r\n"
+            "0123456");
+}
+
 TEST(SelectionTest, HBoxSaturatedSelection) {
   auto element = hbox({
       text("Lorem ipsum dolor"),

Reply via email to