static void select_to_anchor(gboolean rectangle) { ScintillaObject *sci = scintilla_get_current(); if (sci) create_selection(sci, select_anchor, select_space, rectangle); }
HRESULT node_select_nodes(const xmlnode *This, BSTR query, IXMLDOMNodeList **nodes) { xmlChar* str; HRESULT hr; if (!query || !nodes) return E_INVALIDARG; str = xmlchar_from_wchar(query); hr = create_selection(This->node, str, nodes); heap_free(str); return hr; }
static void column_mode_command(ScintillaObject *sci, int command) { /* In the current SCI versions, using the command_keys->command for rectangular selection creates various problems. So we select a stream instead, and convert it to rectangle. It's slower, but all command-s move the cursor at least a word. */ int anchor = sci_get_anchor(sci); int anchor_space = sci_get_anchor_space(sci); sci_set_selection_mode(sci, SC_SEL_STREAM); sci_send_command(sci, command); create_selection(sci, anchor, anchor_space, TRUE); }
static void convert_selection(ScintillaObject *sci, gboolean rectangle) { if (sci_has_selection(sci)) create_selection(sci, sci_get_anchor(sci), sci_get_anchor_space(sci), rectangle); }