{"action":"closed","issue":{"url":"https://api.github.com/repos/Alexey-T/CudaText/issues/349","repository_url":"https://api.github.com/repos/Alexey-T/CudaText","labels_url":"https://api.github.com/repos/Alexey-T/CudaText/issues/349/labels{/name}","comments_url":"https://api.github.com/repos/Alexey-T/CudaText/issues/349/comments","events_url":"https://api.github.com/repos/Alexey-T/CudaText/issues/349/events","html_url":"https://github.com/Alexey-T/CudaText/issues/349","id":142619226,"number":349,"title":"(wish, API) dlg_custom: caret pos for \"edit\"/\"memo\"/\"combo\"","user":{"login":"kvichans","id":7419630,"avatar_url":"https://avatars.githubusercontent.com/u/7419630?v=3","gravatar_id":"","url":"https://api.github.com/users/kvichans","html_url":"https://github.com/kvichans","followers_url":"https://api.github.com/users/kvichans/followers","following_url":"https://api.github.com/users/kvichans/following{/other_user}","gists_url":"https://api.github.com/users/kvichans/gists{/gist_id}","starred_url":"https://api.github.com/users/kvichans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvichans/subscriptions","organizations_url":"https://api.github.com/users/kvichans/orgs","repos_url":"https://api.github.com/users/kvichans/repos","events_url":"https://api.github.com/users/kvichans/events{/privacy}","received_events_url":"https://api.github.com/users/kvichans/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-22T11:14:34Z","updated_at":"2016-03-26T21:15:37Z","closed_at":"2016-03-26T21:15:37Z","body":"Предлагаю добавить еще один параметр при вызове.\r\nСейчас `dlg_custom(title, size_x, size_y, text, focused=-1)`\r\nБудет `dlg_custom(title, size_x, size_y, text, focused=-1, caret=-1)`\r\nИспользовать доп.парам `caret` для выставления каретки внутри текста, если `focused` указывает на контрол типа `edit`, `memo` или `combo`.\r\n\r\nМожно пойти и дальше - добавить два параметра\r\n`dlg_custom(title, size_x, size_y, text, focused=-1, sel_start=-1, sel_len=-1)`\r\nчтобы можно было выделить любую часть в тексте. Тогда для выставление каретки достаточно будет задать `sel_start` и не указывать `sel_len`."}}