I keep getting surprised by .lines() semantics in Rust.
"" -> empty
"foo" -> one line
"foo\n" -> one line
"foo\nbar" -> two lines
I end up using .split('\n') everywhere instead, but .lines() is so convenient it feels like a footgun.
miniblog.
Related Posts
Further tinkering with diagnostics, following feedback!
* Two lines of context above and below now.
* The caret is included in the line below where possible.
* Syntax highlighting of keywords.
I kinda feel that smart context sizing would be better. What do you think so far?
I've heard of a 'burger menu' when a button has three horizontal lines on it, but today I heard 'kebab button'. This is similar, a button with '···'. Clearly UI designers are hungry.
I've heard of a 'burger menu' when a button has three horizontal lines on it, but today I heard 'kebab button'. This is similar, a button with '···'. Clearly UI designers are hungry.

