Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax highlighting doesn't show nim proc definition line in some cases #272

Closed
jrfondren opened this issue May 7, 2019 · 1 comment
Closed
Assignees
Labels

Comments

@jrfondren
Copy link
Contributor

jrfondren commented May 7, 2019

With syntax = true in moerc.toml, a file that begins with the following lines will show with a blank first line:

proc test =
proc wtf) =

(note: proc test = is valid syntax for a void proc that takes no arguments)

There's no problem with these first lines:

proc test: void =
proc test() =

You can also open a file that begins with a valid proc line and then edit it to make the line vanish -- deleting one of the parens in proc test() = is enough.

You can also reveal the first line by prepending a new line -- just O in command mode is enough.

NB: the problem isn't that the highlighting is broken, but that the line isn't displayed at all

This complete example:

proc test =
  echo "Hello, world!"

is displayed by moe as:

1
2   echo "Hello, world!"
3
@fox0430 fox0430 added the bug label May 8, 2019
@jrfondren
Copy link
Contributor Author

With a buffer in this state (with nim syntax highlighting on):

1 proc test =
2   echo <CURSOR>

Entering a graphical char will cause the first line to disappear. Example:

1
2   echo x<CURSOR>

deleting it brings the first line back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants