Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
path: 'nimedit'


- name: Setup Nim
Expand All @@ -21,11 +27,14 @@ 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
run: |
cd nimedit
nimble install -y
nim c -r tests/tester.nim
4 changes: 2 additions & 2 deletions app/nimedit.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1197,4 +1197,4 @@ proc mainProc(ed: Editor) =

initBackend()
mainProc(Editor())
input.quitRequest()
input.shutdown()
2 changes: 1 addition & 1 deletion app/styles.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
8 changes: 8 additions & 0 deletions tests/tester.nim
Original file line number Diff line number Diff line change
@@ -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"
Loading