In order for these checks to work, :filetype on must be invoked *after*
Fugitive is loaded. Otherwise, the FileType event triggers before
FugitiveDetect() is called.
These file types are used almost exclusively inside of Git repositories,
and in the rare case they are not, we're not doing anything particularly
intrusive, so dropping the conditional should have little practical
impact. An exception is fugitive#MapJumps(), which is designed to be
used exclusively with historical buffers, the status buffer, and
captured :Git output, so let's lock it down to those particular
workflows.
We call :setlocal filetype=git before manually triggering BufReadPost,
which means that the FileType events in the plugin file containing
len(FugitiveGitDir()) checks all short circuited. This wasn't noticed
before because:
* They're mostly nonessential, save for fugitive#MapJumps() which we
also explicitly invoke in BufReadCmd.
* If :filetype on is invoked *after* Fugitive is loaded, then it will
set the filetype a second time *after* we've properly set b:git_dir.
(This was the case on my machine, except when reloading the plugin
redefined the autocommands and thus reversed the order.)
The load order issue is also relevant to plain file buffers. This will
require an additional fix.
When expecting <f-args> with -nargs=*, Vim rudely halves sequences of
consecutive backslashes, mutilating our URLs on Windows in the process.
Resort to splitting <q-args> by hand instead.
Closes https://github.com/tpope/vim-fugitive/issues/1579
I intend to expand the use of this temp state to contexts where this
field could be erroneously interpreted as the buffer number of the temp
file itself.
This will enable us to use the temp name in a job backed --paginate.
Since temp file names have been the subject of various issues on win32
in the past, let's make this change sooner rather than later to get a
head start on any bug reports.
Since stdout can contain arbitrary user data, let's touch it as little
as possible. When using a pty, this has no effect, as everything goes
through stdout, but I aim to move handle --paginate with this same
pipeline, and that will not use a pty.
c212d854d5 added initial support for
marks added by blame.markIgnoredLines and blame.markUnblamableLines.
One more change is needed to parse the blame line properly to enable
jumps.
`czz` used to act without confirmation before. But
6b40e51008 changed it to require `<CR>`.
Given that `czw` keeps working without confirmation and that there
is a separate `cz<Space>` map - seems like the change was not intended?