annotate runtime/ftplugin/ps1xml.vim @ 26007:1d2e1c23e458 v8.2.3537

patch 8.2.3537: mode() does not return the right value in 'operatorfunc' Commit: https://github.com/vim/vim/commit/75c30e96cf280a8cc01ac01c41a9252db3e503cc Author: naohiro ono <obcat@icloud.com> Date: Tue Oct 19 11:15:41 2021 +0100 patch 8.2.3537: mode() does not return the right value in 'operatorfunc' Problem: mode() does not return the right value in 'operatorfunc'. Solution: Reset finish_op while calling 'operatorfunc'.
author Bram Moolenaar <Bram@vim.org>
date Tue, 19 Oct 2021 12:30:05 +0200
parents 5c98ea5f5d6e
children 8ae680be2a51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24387
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim filetype plugin file
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Windows PowerShell
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " URL: https://github.com/PProvost/vim-ps1
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Change: 2021 Apr 02
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 " Only do this when not done yet for this buffer
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists("b:did_ftplugin") | finish | endif
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 " Don't load another plug-in for this buffer
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 let b:did_ftplugin = 1
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 let s:cpo_save = &cpo
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 set cpo&vim
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 setlocal tw=0
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 setlocal commentstring=#%s
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 setlocal formatoptions=tcqro
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 " Change the browse dialog on Win32 to show mainly PowerShell-related files
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 if has("gui_win32")
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 let b:browsefilter =
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 \ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 \ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 \ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 \ "All Files (*.*)\t*.*\n"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 endif
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 " Undo the stuff we changed
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 let b:undo_ftplugin = "setlocal tw< cms< fo<" .
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 \ " | unlet! b:browsefilter"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 let &cpo = s:cpo_save
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 unlet s:cpo_save