]> Sergey Matveev's repositories - nnn.git/commit
browse: fix nnn -e (#549)
authorDanh Doan <congdanhqx@gmail.com>
Sun, 3 May 2020 04:26:16 +0000 (04:26 +0000)
committerGitHub <noreply@github.com>
Sun, 3 May 2020 04:26:16 +0000 (09:56 +0530)
commite8e87f6ba2b72a8b7c2eb9a63d8a37a71f148882
tree58752b3973f834dcef892440af0584ccb6d8d9e0
parentff568ea748c9103916b1fe32892cbde4a4fc4706
browse: fix nnn -e (#549)

The current code will start editor if the mime doesn't start with
"text/". But, we want the opposite.

Simplify the check by using `strncmp` instead.

We may improve by writing a helper: `start_withs` in the future.

This change also cleans -Wstrict-aliasing on Ubuntu 16.04 LTS
src/nnn.c