Clicking Error overlay should feed the correct line number for gvim.
Added `gvim` in `COMMON_EDITORS_LINUX`, launches new gvim when it is running.
Tested with gvim 8.0.707 on a Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux VM
Relates to https://github.com/facebook/create-react-app/issues/2636.
* Use file name whitelist to prevent RCE
Use a whitelist to validate user-provided file names. This doesn't cover
the entire range of valid filenames but should cover almost all of them
in practice. Allows letters, numbers, periods, dashes, and underscores.
Opting to use a whitelist instead of a blacklist because getting this
wrong leaves us vulnerable to a RCE attack.
* Allow alphabet characters from all languages
Updated the whitelist to /^[\p{L}0-9/.\-_]+$/u, which matches
alphanumeric characters, periods, dashes, and underscores. Unicode
property support is stage 4 so I've inlined the transpiled version.
* Only use file name whitelist on Windows
* Log error message if file name does not pass whitelist
* add support to set REACT_EDITOR to none
* change README message
* change condition to avoid problems with editor being null
* move condition to avoid extra code
* Auto-detect running editor on Linux for error overlay
Basic support of auto detecting running editor for #2636.
Tested on Ubuntu 16.04.
It detects few editors. JetBrains products should start by
wrapper like /usr/local/bin/webstorm. Otherwise it takes a
lot of time to open editor.
* Comments fixed.
* List all processes owned by you
* Comment rewording
This allows you to set REACT_EDITOR to 'vim --remote', so the file can
be opened in an already running vim process. When using vim without
remote, it works in the same way as before.
When launching vim without --remote, the order of the line and path
arguments doesn't matter. However, when using --remote the line argument
has to precede the path. This happens to be the same as joe and emacs
uses, so the vim cases were just moved there.
I haven't tested this with mvim, but the documentation says the same as
the vim documentation, so I assume it works the same.