TUI: mouse drag selection with OSC 52 copy; Markdown emphasis follows CommonMark; v0.5.0
ci / linux (clang) (push) Failing after 21m53s
ci / linux (gcc) (push) Failing after 48s
ci / musl (push) Canceled after 0s
ci / macos (push) Canceled after 0s
ci / sanitizers (push) Canceled after 11m39s

- Drag, double-click (word) and triple-click (line) selection in the log,
  auto-scroll at the edges, soft-wrapped lines joined on copy.
- sashidown ANSI renderer: delimiter runs with flanking rules, so
  intraword underscores (test_apply_patch.c) stay literal; unmatched
  * _ and backticks are shown as-is; * and _ do not close each other.
- tests: test_textsel, test_markdown.
This commit is contained in:
WHC
2026-10-06 14:24:42 +08:00
parent b28bca2cfc
commit 1c26cc6e30
11 changed files with 875 additions and 111 deletions
+11 -3
View File
@@ -80,7 +80,7 @@ set(CST_CORE_SOURCES
set(CST_SOURCES ${CST_CORE_SOURCES} src/main.c)
if(CST_BUILD_TUI)
list(APPEND CST_SOURCES src/tui.c)
list(APPEND CST_SOURCES src/textsel.c src/tui.c)
else()
list(APPEND CST_SOURCES src/tui_stub.c)
endif()
@@ -151,9 +151,17 @@ endif()
# --- tests ---
enable_testing()
set(_CST_SMALL_TESTS test_ctl_frontier test_ctl_heredoc test_json_baseline
test_replay_starvation test_replay_real test_mm_tool)
test_replay_starvation test_replay_real test_mm_tool test_textsel
test_markdown)
foreach(t ${_CST_SMALL_TESTS})
if(t STREQUAL test_ctl_frontier OR t STREQUAL test_ctl_heredoc)
if(t STREQUAL test_textsel)
add_executable(${t} tests/${t}.c src/textsel.c)
elseif(t STREQUAL test_markdown)
add_executable(${t} tests/${t}.c)
target_include_directories(${t} PRIVATE "${SD_DIR}/include")
target_link_libraries(${t} PRIVATE "${SASHIDOWN_A}")
add_dependencies(${t} sashidown)
elseif(t STREQUAL test_ctl_frontier OR t STREQUAL test_ctl_heredoc)
add_executable(${t} tests/${t}.c src/ctl_parse.c)
elseif(t STREQUAL test_json_baseline)
add_executable(${t} tests/${t}.c src/json_baseline.c vendor/cjson/cJSON.c)