function closeInlineWidget(hostEditor, inlineWidget, moveFocus) {
        if (moveFocus) {
            // Place cursor back on the line just above the inline (the line from which it was opened)
            // If cursor's already on that line, leave it be to preserve column position
            var widgetLine = hostEditor._codeMirror.getInlineWidgetInfo(inlineWidget.id).line;
            var cursorLine = hostEditor.getCursorPos().line;
            if (cursorLine !== widgetLine) {
                hostEditor.setCursorPos({ line: widgetLine, pos: 0 });
            }
            
            hostEditor.focus();
        }
        
        hostEditor.removeInlineWidget(inlineWidget);
    }
Removes the given widget UI from the given hostEditor (agnostic of what the widget's content
is). The widget's onClosed() callback will be run as a result.
@param {!Editor} hostEditor The editor containing the widget.
@param {!InlineWidget} inlineWidget The inline widget to close.
@param {!boolean} moveFocus  If true, focuses hostEditor and ensures the cursor position lies
     near the inline's location.