Do not require trailing newline in config file #586.
authorDaniel Carl <danielcarl@gmx.de>
Fri, 10 Jan 2020 22:18:42 +0000 (23:18 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Fri, 10 Jan 2020 22:21:18 +0000 (23:21 +0100)
CHANGELOG.md
src/ex.c

index d49fbfc..300f29c 100644 (file)
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 ### Added
 * The new env variable `$VIMB_SELECTION` is set to the current selected text
   whenever a `shellcmd` is run #592.
+### Fixed
+* Fixed ignored last line in config file if this line did not end in newline.
 ### Removed
 * Expansion of `%` to the current opened URI for `:shellcmd` was removed
   because it breaks the `x-hint-command` with URIs containing '%'. But it is
index acf233c..c296c62 100644 (file)
--- a/src/ex.c
+++ b/src/ex.c
@@ -477,7 +477,7 @@ VbCmdResult ex_run_file(Client *c, const char *filename)
         return res;
     }
 
-    length = g_strv_length(lines) - 1;
+    length = g_strv_length(lines);
     for (i = 0; i < length; i++) {
         line = lines[i];
         /* skip commented or empty lines */