diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-05-25 17:36:12 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-05-25 17:36:12 +0100 |
| commit | fe70add4b764d7af7968498c4f5557d651119a42 (patch) | |
| tree | 574045077066f112411adb10c51b2ec18457afbc /src/option_manager.cc | |
| parent | f08966197eaf0ca5f5012d6ec8378815bd1f32ec (diff) | |
Disable 'interactive' options in :exec/:eval
Incremental search, automatic info and completion are
not needed in non interactive context.
Diffstat (limited to 'src/option_manager.cc')
| -rw-r--r-- | src/option_manager.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/option_manager.cc b/src/option_manager.cc index f2c6576c..0bb2f4df 100644 --- a/src/option_manager.cc +++ b/src/option_manager.cc @@ -56,7 +56,7 @@ Option& OptionManager::get_local_option(const String& name) } -const Option& OptionManager::operator[](const String& name) const +Option& OptionManager::operator[](const String& name) { auto it = find_option(m_options, name); if (it != m_options.end()) @@ -67,6 +67,11 @@ const Option& OptionManager::operator[](const String& name) const throw option_not_found(name); } +const Option& OptionManager::operator[](const String& name) const +{ + return const_cast<OptionManager&>(*this)[name]; +} + template<typename MatchingFunc> CandidateList OptionManager::get_matching_names(MatchingFunc func) { |
