aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-02-19 17:48:51 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-02-19 18:05:20 -0800
commitaaa0c25ff7d30249e62a9d185e53e60dd7fdbc37 (patch)
tree025f77d5c2e810f2224e57d3efbb6ff443246465 /reader.cpp
parent2f43584727075708dc842975f5058947b57ba0c4 (diff)
Large set of changes to how PATH is handled. Changed fish to no longer modify PATH in share/config.fish. Introduced variable fish_user_paths, and a glue function __fish_reconstruct_path that splices together PATH with fish_user_paths. Changed fish to no longer validate changes to PATH unless the paths are new (i.e. don't recheck what's already there). Modified certain sets to store const wchar_t instead of wcstring to save a few allocations.
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/reader.cpp b/reader.cpp
index ba9bd23f..cf6dca68 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -3101,18 +3101,18 @@ const wchar_t *reader_readline()
const wchar_t *buff = data->command_line.c_str();
const wchar_t *end = &buff[data->buff_pos];
const wchar_t *begin = end;
-
+
/* Make sure we delete at least one character (see #580) */
begin--;
-
+
/* Delete until we hit a newline, or the beginning of the string */
while (begin > buff && *begin != L'\n')
begin--;
-
+
/* If we landed on a newline, don't delete it */
if (*begin == L'\n')
begin++;
-
+
assert(end >= begin);
size_t len = maxi<size_t>(end-begin, 1);
begin = end - len;