mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
When a file is edited, vim adds a \n at the end
This commit is contained in:
parent
bc5234be8d
commit
43fc9890e8
2
nnn.1
2
nnn.1
|
@ -263,7 +263,7 @@ paths. Any action performed on these symlinks will be performed only on their
|
||||||
targets, after which they might become invalid.
|
targets, after which they might become invalid.
|
||||||
.Pp
|
.Pp
|
||||||
Though the term "files" is used, any input is valid as long as it's a valid
|
Though the term "files" is used, any input is valid as long as it's a valid
|
||||||
path. Invalid paths will be ignored.
|
path. \fBInvalid paths will be ignored.\fR
|
||||||
.Sh UNITS
|
.Sh UNITS
|
||||||
The minimum file size unit is byte (B). The rest are K, M, G, T, P, E, Z, Y
|
The minimum file size unit is byte (B). The rest are K, M, G, T, P, E, Z, Y
|
||||||
(powers of 1024), same as the default units in \fIls\fR.
|
(powers of 1024), same as the default units in \fIls\fR.
|
||||||
|
|
|
@ -964,11 +964,11 @@ static char *common_prefix(const char *path, char *prefix)
|
||||||
while (*x && *y && (*x == *y))
|
while (*x && *y && (*x == *y))
|
||||||
++x, ++y;
|
++x, ++y;
|
||||||
|
|
||||||
/* Strings are same OR prefix is smaller */
|
/* Strings are same OR prefix is shorter */
|
||||||
if ((!*x && !*y) || !*y)
|
if ((!*x && !*y) || !*y)
|
||||||
return prefix;
|
return prefix;
|
||||||
|
|
||||||
/* Path is smaller */
|
/* Path is shorter */
|
||||||
if (!*x) {
|
if (!*x) {
|
||||||
xstrlcpy(prefix, path, path - x + 1);
|
xstrlcpy(prefix, path, path - x + 1);
|
||||||
return prefix;
|
return prefix;
|
||||||
|
@ -6219,7 +6219,7 @@ static char *load_input()
|
||||||
DPRINTF_S(paths[0]);
|
DPRINTF_S(paths[0]);
|
||||||
|
|
||||||
for (i = 0; i < entries; ++i) {
|
for (i = 0; i < entries; ++i) {
|
||||||
if (selforparent(paths[i])) {
|
if (paths[i][0] == '\n' || selforparent(paths[i])) {
|
||||||
paths[i] = NULL;
|
paths[i] = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue