aboutsummaryrefslogtreecommitdiffhomepage
path: root/history.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-11-19 00:31:03 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-11-19 00:31:03 -0800
commit26678682ca90b68f19b993e259bf43384c0a18ec (patch)
treeaf119f1845d12657d42e8ba57f90350c9f89c57f /history.cpp
parent7d63900fb8167d344a58c0c7e541166974b0c672 (diff)
Fix indentation of switch statements
Diffstat (limited to 'history.cpp')
-rw-r--r--history.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/history.cpp b/history.cpp
index 07b6e3f7..dd12eb95 100644
--- a/history.cpp
+++ b/history.cpp
@@ -176,17 +176,17 @@ bool history_item_t::matches_search(const wcstring &term, enum history_search_ty
switch (type)
{
- case HISTORY_SEARCH_TYPE_CONTAINS:
- /* We consider equal strings to NOT match a contains search (so that you don't have to see history equal to what you typed). The length check ensures that. */
- return contents.size() > term.size() && contents.find(term) != wcstring::npos;
+ case HISTORY_SEARCH_TYPE_CONTAINS:
+ /* We consider equal strings to NOT match a contains search (so that you don't have to see history equal to what you typed). The length check ensures that. */
+ return contents.size() > term.size() && contents.find(term) != wcstring::npos;
- case HISTORY_SEARCH_TYPE_PREFIX:
- /* We consider equal strings to match a prefix search, so that autosuggest will allow suggesting what you've typed */
- return string_prefixes_string(term, contents);
+ case HISTORY_SEARCH_TYPE_PREFIX:
+ /* We consider equal strings to match a prefix search, so that autosuggest will allow suggesting what you've typed */
+ return string_prefixes_string(term, contents);
- default:
- sanity_lose();
- return false;
+ default:
+ sanity_lose();
+ return false;
}
}
@@ -388,25 +388,25 @@ static size_t offset_of_next_item_fish_1_x(const char *begin, size_t mmap_length
switch (*pos)
{
- case '\\':
- {
- pos++;
- break;
- }
-
- case '\n':
- {
- if (ignore_newline)
+ case '\\':
{
- ignore_newline = false;
+ pos++;
+ break;
}
- else
+
+ case '\n':
{
- /* Note: pos will be left pointing just after this newline, because of the ++ in the loop */
- all_done = true;
+ if (ignore_newline)
+ {
+ ignore_newline = false;
+ }
+ else
+ {
+ /* Note: pos will be left pointing just after this newline, because of the ++ in the loop */
+ all_done = true;
+ }
+ break;
}
- break;
- }
}
}
*inout_cursor = (pos - begin);
@@ -419,19 +419,19 @@ static size_t offset_of_next_item(const char *begin, size_t mmap_length, history
size_t result;
switch (mmap_type)
{
- case history_type_fish_2_0:
- result = offset_of_next_item_fish_2_0(begin, mmap_length, inout_cursor, cutoff_timestamp);
- break;
+ case history_type_fish_2_0:
+ result = offset_of_next_item_fish_2_0(begin, mmap_length, inout_cursor, cutoff_timestamp);
+ break;
- case history_type_fish_1_x:
- result = offset_of_next_item_fish_1_x(begin, mmap_length, inout_cursor, cutoff_timestamp);
- break;
+ case history_type_fish_1_x:
+ result = offset_of_next_item_fish_1_x(begin, mmap_length, inout_cursor, cutoff_timestamp);
+ break;
- default:
- case history_type_unknown:
- // Oh well
- result = (size_t)(-1);
- break;
+ default:
+ case history_type_unknown:
+ // Oh well
+ result = (size_t)(-1);
+ break;
}
return result;
}
@@ -706,12 +706,12 @@ history_item_t history_t::decode_item(const char *base, size_t len, history_file
{
switch (type)
{
- case history_type_fish_1_x:
- return history_t::decode_item_fish_1_x(base, len);
- case history_type_fish_2_0:
- return history_t::decode_item_fish_2_0(base, len);
- default:
- return history_item_t(L"");
+ case history_type_fish_1_x:
+ return history_t::decode_item_fish_1_x(base, len);
+ case history_type_fish_2_0:
+ return history_t::decode_item_fish_2_0(base, len);
+ default:
+ return history_item_t(L"");
}
}