Skip to content

Commit

Permalink
Merge pull request #1043 from fox0430/hotfix
Browse files Browse the repository at this point in the history
v0.2.2.1
  • Loading branch information
fox0430 authored Sep 18, 2020
2 parents dbb8257 + b331c18 commit 297e793
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion moe.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.2.2"
version = "0.2.2.1"
author = "fox0430"
description = "A command lined based text editor"
license = "GPLv3"
Expand Down
2 changes: 1 addition & 1 deletion shpec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe "moe is an editor"
describe "invocation options"

it "can display it's version"
assert equal `moe -v | grep -oPq "^moe v\d+\.\d+\.\d+$";echo $?` 0
assert equal `moe -v | grep -oPq "^moe v\d+\.\d+\.\d+.\d+$";echo $?` 0
end

it "can display command line options"
Expand Down
9 changes: 3 additions & 6 deletions src/moepkg/exmode.nim
Original file line number Diff line number Diff line change
Expand Up @@ -806,12 +806,9 @@ proc editCommand(status: var EditorStatus, filename: seq[Rune]) =
status.commandWindow.writeNoWriteError(status.messageLog)
else:
if dirExists($filename):
try: setCurrentDir($filename)
except OSError:
status.commandWindow.writeFileOpenError($filename, status.messageLog)
status.addNewBuffer("")
status.bufStatus.add(BufferStatus(mode: Mode.filer, lastSaveTime: now()))
else: status.addNewBuffer($filename)
status.addNewBuffer($filename, Mode.filer)
else:
status.addNewBuffer($filename)

status.changeCurrentBuffer(status.bufStatus.high)

Expand Down
11 changes: 11 additions & 0 deletions tests/texmode.nim
Original file line number Diff line number Diff line change
Expand Up @@ -756,3 +756,14 @@ suite "Ex mode: Change smartcase setting command":
status.exModeCommand(command)

check not status.settings.smartcase

suite "Ex mode: e command":
test "Open dicrecoty (#1042)":
var status = initEditorStatus()
status.addNewBuffer

const command = @[ru"e", ru"./"]
status.exModeCommand(command)

check status.bufStatus[1].mode == Mode.filer
check status.bufStatus[1].path == (ru getCurrentDir()) & ru"/"

0 comments on commit 297e793

Please sign in to comment.