diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-20 22:33:19 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-05-20 22:33:19 +0200 |
commit | 7cc01c704c86f45854c29cb8427ed3b3029b4188 (patch) | |
tree | 77210b9f4ae69a023e65d9e5e4a3caf8951a6c1d /src/nvim/lua/vim.lua | |
parent | b9ba1295b466a440600b36a717c701bfcea53dbc (diff) | |
parent | 6feb9cb09d243eb811e301b39dbfbba5863617be (diff) | |
download | rneovim-7cc01c704c86f45854c29cb8427ed3b3029b4188.tar.gz rneovim-7cc01c704c86f45854c29cb8427ed3b3029b4188.tar.bz2 rneovim-7cc01c704c86f45854c29cb8427ed3b3029b4188.zip |
Merge #9709 'fileio: use os_copy to create backups'
ref #8288
Diffstat (limited to 'src/nvim/lua/vim.lua')
-rw-r--r-- | src/nvim/lua/vim.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua index 38a8795680..9cd8e232d5 100644 --- a/src/nvim/lua/vim.lua +++ b/src/nvim/lua/vim.lua @@ -161,8 +161,7 @@ end --@returns String with whitespace removed from its beginning and end local function trim(s) assert(type(s) == 'string', 'Only strings can be trimmed') - local result = s:gsub('^%s+', ''):gsub('%s+$', '') - return result + return s:match('^%s*(.*%S)') or '' end local function __index(t, key) |