aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Aaron Gyes <me@aaron.gy>2016-06-25 00:56:25 -0700
committerGravatar Aaron Gyes <me@aaron.gy>2016-06-25 01:10:58 -0700
commita6ec2dc3ed52806f2de974566af2bef4695dbc6a (patch)
tree298354aa5f9d906f0695a4962003f237bdaa2b52
parent6ec83568b5ac5684200a0466831c1717318cbe7a (diff)
Remove oopsies while pasting.
(also, last commit log had a typo. "3.4.0-Microsoft" is the string we should check for. Actual string in my code was correct.)
-rw-r--r--src/fish.cpp14
-rw-r--r--src/fish_tests.cpp4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/fish.cpp b/src/fish.cpp
index b50a79b7..1d71e2c5 100644
--- a/src/fish.cpp
+++ b/src/fish.cpp
@@ -410,11 +410,11 @@ static int fish_parse_opt(int argc, char **argv, std::vector<std::string> *cmds)
/// routines.
static void misc_init() {
#ifdef OS_IS_CYGWIN
- if (cmdfile) fclose(cmdfile)
- // MS Windows tty devices do not currently have either a read or write timestamp. Those respective fields
- // of `struct stat` are always the current time. Which means we can't use them. So we assume no
- // external program has written to the terminal behind our back. This makes multiline prompts
- // usable. See issue #2859 and https://github.com/Microsoft/BashOnWindows/issues/545
+ // MS Windows tty devices do not currently have either a read or write timestamp. Those
+ // respective fields of `struct stat` are always the current time. Which means we can't
+ // use them. So we assume no external program has written to the terminal behind our
+ // back. This makes multiline promptusable. See issue #2859 and
+ // https://github.com/Microsoft/BashOnWindows/issues/545
has_working_tty_timestamps = false;
#else
// This covers preview builds of Windows Subsystem for Linux (WSL).
@@ -426,7 +426,9 @@ static void misc_init() {
has_working_tty_timestamps = false;
}
}
- if (procsyskosrel) { fclose(procsyskosrel); }
+ if (procsyskosrel) {
+ fclose(procsyskosrel);
+ }
#endif // OS_IS_MS_WINDOWS
}
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp
index 681428a7..f3dd5352 100644
--- a/src/fish_tests.cpp
+++ b/src/fish_tests.cpp
@@ -2255,8 +2255,7 @@ static int test_universal_helper(int *x) {
static void test_universal() {
say(L"Testing universal variables");
- if (system("mkdir -p /tmp/fish_uvars_test/"))
- err(L"mkdir failed");
+ if (system("mkdir -p /tmp/fish_uvars_test/")) err(L"mkdir failed");
const int threads = 16;
static int ctx[threads];
@@ -2732,7 +2731,6 @@ void history_tests_t::test_history_merge(void) {
do_test(string_rep == string_rep2);
}
-
// Add some more per-history items.
for (size_t i = 0; i < count; i++) {
hists[i]->add(alt_texts[i]);