Showing lines of context is a remarkably hard problem for a syntactic diff.
Line 23 on the right is new, but lines 24 and 25 also map to the same line on the left! Initially I thought this was a bug.
It's impossible to show exactly N context lines whilst preserving alignment.
miniblog.
Related Posts
Today I learnt that Lua projects often use *3* spaces for indentation! https://github.com/luarocks/lua-style-guide/blob/master/README.md#indentation-and-formatting
I initially thought something was very wrong with editor config.
I'm fascinated to learn that some distros are including the whole HTML manual in the package!
It seems like a nice thing for users, but I was initially surprised to see JS in the package.
"When your Rust code breaks, look at unsafe blocks."
I initially parsed this as "consider adding unsafe blocks"! Turns out they meant "crashes are more likely to be caused by existing unsafe blocks". Phew.
