aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-10-31 01:15:50 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-10-31 01:15:50 -0700
commit7ac593273e25d5ce39104dc1752660a43a29f61d (patch)
tree1f0a18a2f49a61460ff8d7c1c3de375af37395d4 /reader.cpp
parenta529fc9d83295fdf9418436b68d056162ba8231b (diff)
Remove a bunch of dead code identified by cppcheck
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/reader.cpp b/reader.cpp
index a3ad43f1..ecf42bb3 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -1608,7 +1608,6 @@ static void clear_pager()
static void select_completion_in_direction(enum selection_direction_t dir)
{
assert(data != NULL);
- /* Note: this will probably trigger reader_selected_completion_changed, which will cause us to update stuff */
bool selection_changed = data->pager.select_next_completion_in_direction(dir, data->current_page_rendering);
if (selection_changed)
{
@@ -4151,36 +4150,6 @@ int reader_has_pager_contents()
return ! data->current_page_rendering.screen_data.empty();
}
-void reader_selected_completion_changed(pager_t *pager)
-{
- /* Only interested in the top level pager */
- if (data == NULL || pager != &data->pager)
- return;
-
- const completion_t *completion = pager->selected_completion(data->current_page_rendering);
-
- /* Update the cursor and command line */
- size_t cursor_pos = data->cycle_cursor_pos;
- wcstring new_cmd_line;
-
- if (completion == NULL)
- {
- new_cmd_line = data->cycle_command_line;
- }
- else
- {
- new_cmd_line = completion_apply_to_command_line(completion->completion, completion->flags, data->cycle_command_line, &cursor_pos, false);
- }
- reader_set_buffer_maintaining_pager(new_cmd_line, cursor_pos);
-
- /* Since we just inserted a completion, don't immediately do a new autosuggestion */
- data->suppress_autosuggestion = true;
-
- /* Trigger repaint (see #765) */
- reader_repaint_needed();
-}
-
-
/**
Read non-interactively. Read input from stdin without displaying
the prompt, using syntax highlighting. This is used for reading