mirror of https://github.com/davatorium/rofi.git
parent
73e174b67b
commit
508e39c3f3
|
@ -313,5 +313,12 @@ PangoAttrList *textbox_get_pango_attributes ( textbox *tb );
|
||||||
*/
|
*/
|
||||||
const char *textbox_get_visible_text ( const textbox *tb );
|
const char *textbox_get_visible_text ( const textbox *tb );
|
||||||
int textbox_get_desired_width ( widget *wid );
|
int textbox_get_desired_width ( widget *wid );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param tb Handle to the textbox
|
||||||
|
*
|
||||||
|
* Move the cursor to the end of the string.
|
||||||
|
*/
|
||||||
|
void textbox_cursor_end ( textbox *tb );
|
||||||
/*@}*/
|
/*@}*/
|
||||||
#endif //ROFI_TEXTBOX_H
|
#endif //ROFI_TEXTBOX_H
|
||||||
|
|
|
@ -1696,6 +1696,7 @@ RofiViewState *rofi_view_create ( Mode *sw,
|
||||||
|
|
||||||
if ( state->text && input ) {
|
if ( state->text && input ) {
|
||||||
textbox_text ( state->text, input );
|
textbox_text ( state->text, input );
|
||||||
|
textbox_cursor_end ( state->text );
|
||||||
}
|
}
|
||||||
|
|
||||||
state->overlay = textbox_create ( WIDGET_TYPE_TEXTBOX_TEXT, "window.overlay", TB_AUTOWIDTH | TB_AUTOHEIGHT, URGENT, "blaat", 0.5, 0 );
|
state->overlay = textbox_create ( WIDGET_TYPE_TEXTBOX_TEXT, "window.overlay", TB_AUTOWIDTH | TB_AUTOHEIGHT, URGENT, "blaat", 0.5, 0 );
|
||||||
|
|
|
@ -49,13 +49,6 @@ static int textbox_get_width ( widget * );
|
||||||
static int _textbox_get_height ( widget * );
|
static int _textbox_get_height ( widget * );
|
||||||
static void __textbox_update_pango_text ( textbox *tb );
|
static void __textbox_update_pango_text ( textbox *tb );
|
||||||
|
|
||||||
/**
|
|
||||||
* @param tb Handle to the textbox
|
|
||||||
*
|
|
||||||
* Move the cursor to the end of the string.
|
|
||||||
*/
|
|
||||||
static void textbox_cursor_end ( textbox *tb );
|
|
||||||
|
|
||||||
/** Default pango context */
|
/** Default pango context */
|
||||||
static PangoContext *p_context = NULL;
|
static PangoContext *p_context = NULL;
|
||||||
/** The pango font metrics */
|
/** The pango font metrics */
|
||||||
|
@ -585,7 +578,7 @@ static void textbox_cursor_dec_word ( textbox *tb )
|
||||||
}
|
}
|
||||||
|
|
||||||
// end of line
|
// end of line
|
||||||
static void textbox_cursor_end ( textbox *tb )
|
void textbox_cursor_end ( textbox *tb )
|
||||||
{
|
{
|
||||||
if ( tb->text == NULL ) {
|
if ( tb->text == NULL ) {
|
||||||
tb->cursor = 0;
|
tb->cursor = 0;
|
||||||
|
|
Loading…
Reference in New Issue