From b13c57532c8f79f8a3410a566c61f8122ce4847b Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 14 Apr 2026 16:44:30 +0800 Subject: [PATCH 01/13] adds a ci --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6cf2c16 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + + - name: Setup Nim + uses: alaviss/setup-nim@0.1.1 + with: + version: devel + path: 'nim' + + - name: Nim version + run: nim --version + + - name: install deps + run: | + sudo apt update + sudo apt install libx11-dev libxft-dev fonts-freefont-ttf fonts-dejavu-core + + + - name: Build + run: nimble install From af7ca41e52826fe65a171e76ed7150e089140d7e Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 14 Apr 2026 16:50:16 +0800 Subject: [PATCH 02/13] Update .github/workflows/ci.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cf2c16..e6f7270 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,4 +28,4 @@ jobs: - name: Build - run: nimble install + run: nimble install -y From 144ebc59db25f5bb5fd4125479a7a22c8bc43192 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:09:37 +0800 Subject: [PATCH 03/13] build on platforms --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6f7270..93d7a56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,10 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v6 @@ -21,11 +24,11 @@ jobs: - name: Nim version run: nim --version - - name: install deps + - name: install deps (Linux only) + if: matrix.os == 'ubuntu-latest' run: | sudo apt update sudo apt install libx11-dev libxft-dev fonts-freefont-ttf fonts-dejavu-core - - name: Build run: nimble install -y From 37725700a6cbca51e7afdcfb5433d83ee0aaf73f Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:15:09 +0800 Subject: [PATCH 04/13] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93d7a56..4781767 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,4 +31,4 @@ jobs: sudo apt install libx11-dev libxft-dev fonts-freefont-ttf fonts-dejavu-core - name: Build - run: nimble install -y + run: nimble build From cb53a4707423474dcb41956b1bab5a1c74e7b8db Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:33:57 +0800 Subject: [PATCH 05/13] tests --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4781767..7207b03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,8 @@ on: jobs: build: strategy: + fail-fast: false + matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From ef925e80f0111e2e8673ee97d77e1ea2f4989593 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:34:16 +0800 Subject: [PATCH 06/13] oops --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7207b03..1df3fa8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ jobs: build: strategy: fail-fast: false - matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From 19f927d6025e269f44499936837f69e7003b8325 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:36:48 +0800 Subject: [PATCH 07/13] test again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1df3fa8..9cf5bfb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: build: strategy: - fail-fast: false + fail-fast: true matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From f154e00d8fd2d7d732c610b371abd2d2518c420b Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:39:28 +0800 Subject: [PATCH 08/13] compilation testing --- .github/workflows/ci.yml | 2 +- tests/tester.nim | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/tester.nim diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cf5bfb..b7f2b61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,4 +32,4 @@ jobs: sudo apt install libx11-dev libxft-dev fonts-freefont-ttf fonts-dejavu-core - name: Build - run: nimble build + run: nim c -r tests/tester.nim diff --git a/tests/tester.nim b/tests/tester.nim new file mode 100644 index 0000000..222b087 --- /dev/null +++ b/tests/tester.nim @@ -0,0 +1,8 @@ +import std/os + +proc fatal(msg: string) = quit "FAILURE " & msg + +proc exec(cmd: string) = + if execShellCmd(cmd) != 0: fatal cmd + +exec "nim c app/nimedit.nim" From 6f46ab765df55dc3c984be43a8aebc5fed3c8f16 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:40:48 +0800 Subject: [PATCH 09/13] progress --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7f2b61..ebefd4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: build: strategy: - fail-fast: true + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From 3a6b0eae052e77c62c44659f6f4b6876e6b02209 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:46:36 +0800 Subject: [PATCH 10/13] cd nimedit --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebefd4d..bb729f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: uses: alaviss/setup-nim@0.1.1 with: version: devel - path: 'nim' + path: 'nimedit' - name: Nim version run: nim --version @@ -32,4 +32,6 @@ jobs: sudo apt install libx11-dev libxft-dev fonts-freefont-ttf fonts-dejavu-core - name: Build - run: nim c -r tests/tester.nim + run: | + cd nimedit + nim c -r tests/tester.nim From 6716f88ff40569362db56b1444f1ea92f2834e22 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:48:26 +0800 Subject: [PATCH 11/13] progress --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb729f6..fed0085 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,13 +14,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + path: 'nimedit' - name: Setup Nim uses: alaviss/setup-nim@0.1.1 with: version: devel - path: 'nimedit' + path: 'nim' - name: Nim version run: nim --version From 8e20f07fa44d508e2cdbc6555fdcc60d78406314 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:49:23 +0800 Subject: [PATCH 12/13] oops --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fed0085..d321a4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,4 +36,5 @@ jobs: - name: Build run: | cd nimedit + nimble install -y nim c -r tests/tester.nim From f5ef51744ccea61a26f16fded5485683f82c8981 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 16 Apr 2026 21:00:55 +0800 Subject: [PATCH 13/13] uses `shutdown` --- app/nimedit.nim | 4 ++-- app/styles.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/nimedit.nim b/app/nimedit.nim index aed149d..be254a7 100644 --- a/app/nimedit.nim +++ b/app/nimedit.nim @@ -868,7 +868,7 @@ proc runAction(ed: Editor; action: Action; arg: string; shiftKeyPressed: bool): if ed.buffersCounter >= 2: moveTabToRightWindow(ed) - of Action.QuitApplication: input.quitRequest() + of Action.QuitApplication: input.shutdown() of Action.Declarations: if main.lang == langNim: main.filterLines = not main.filterLines @@ -1197,4 +1197,4 @@ proc mainProc(ed: Editor) = initBackend() mainProc(Editor()) -input.quitRequest() +input.shutdown() diff --git a/app/styles.nim b/app/styles.nim index faaac99..b69cfff 100644 --- a/app/styles.nim +++ b/app/styles.nim @@ -74,7 +74,7 @@ proc findStyledFontFile(mainFontFile: Path; style: FontStyle): Path = fmt"Could not find font file that matches style {style}!") proc fatal*(msg: string) {.noReturn.} = - quitRequest() + shutdown() quit(msg) proc parseColor*(hex: string): Color =