| 47 | } |
| 48 | |
| 49 | void optionallyFocusViewWidget(const Sublime::View* view, bool focus) |
| 50 | { |
| 51 | if (!focus || !view) { |
| 52 | return; // nothing to do |
| 53 | } |
| 54 | auto* const widget = view->widget(); |
| 55 | if (!widget->hasFocus()) { |
| 56 | widget->setFocus(); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | } // unnamed namespace |
| 61 |
no test coverage detected