Skip to content

Commit

Permalink
Add message for Readonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fox0430 committed Jul 31, 2021
1 parent 5b952d9 commit 263e368
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 40 deletions.
6 changes: 6 additions & 0 deletions src/moepkg/messages.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import color, unicodeext, settings, commandline, independentutils
proc writeMessageOnCommandWindow*(commandLine: var CommandLine,
message: string,
color: EditorColorPair) {.inline.} =

commandLine.updateCommandBuffer(ru message, color)

proc writeMessageOnCommandWindow*(commandLine: var CommandLine,
message: string) {.inline.} =

commandLine.writeMessageOnCommandWindow(message, EditorColorPair.commandBar)

proc writeNoWriteError*(commandLine: var CommandLine, messageLog: var seq[seq[Rune]]) =
Expand Down Expand Up @@ -296,3 +298,7 @@ proc writeCurrentCharInfo*(commandLine: var CommandLine, r: Rune) {.inline.} =
eOct = int64(e[0]).toOct(5)
mess = fmt "<{$r}> {e[0]} Hex {normalizeHex($eHex)} Oct {$eOct}"
commandLine.writeMessageOnCommandWindow(mess)

proc writeReadonlyModeWarning*(commandLine: var CommandLine) {.inline.} =
const mess = "Warning: Readonly mode"
commandLine.writeMessageOnCommandWindow(mess, EditorColorPair.errorMessage)
Loading

0 comments on commit 263e368

Please sign in to comment.