{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/7723","repository_url":"https://api.github.com/repos/neovim/neovim","labels_url":"https://api.github.com/repos/neovim/neovim/issues/7723/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/7723/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/7723/events","html_url":"https://github.com/neovim/neovim/issues/7723","id":281932433,"number":7723,"title":"GUI: initial screen update is just wrong!","user":{"login":"stacksmith","id":732800,"avatar_url":"https://avatars1.githubusercontent.com/u/732800?v=4","gravatar_id":"","url":"https://api.github.com/users/stacksmith","html_url":"https://github.com/stacksmith","followers_url":"https://api.github.com/users/stacksmith/followers","following_url":"https://api.github.com/users/stacksmith/following{/other_user}","gists_url":"https://api.github.com/users/stacksmith/gists{/gist_id}","starred_url":"https://api.github.com/users/stacksmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stacksmith/subscriptions","organizations_url":"https://api.github.com/users/stacksmith/orgs","repos_url":"https://api.github.com/users/stacksmith/repos","events_url":"https://api.github.com/users/stacksmith/events{/privacy}","received_events_url":"https://api.github.com/users/stacksmith/received_events","type":"User","site_admin":false},"labels":[{"id":124510010,"url":"https://api.github.com/repos/neovim/neovim/labels/design","name":"design","color":"e6e6e6","default":false},{"id":242522707,"url":"https://api.github.com/repos/neovim/neovim/labels/rpc","name":"rpc","color":"c7def8","default":false},{"id":113026979,"url":"https://api.github.com/repos/neovim/neovim/labels/ui","name":"ui","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2017-12-13T23:29:09Z","updated_at":"2017-12-18T19:07:09Z","closed_at":null,"author_association":"NONE","body":"NVIM v0.2.2  xubuntu 17.04 zesty  no terminal/messagepack only.\r\n\r\n# Problem description:\r\n\r\nInitial screen grid update is sent from nvim _before_ modes are established and default styles and colors are set.  The screen is cleared before colors are established.  Most of the screen, with the exception of the first line, is then filled with bold spaces, before styling information is established.   Status line is displayed as inverted, once again, before the colors are established.\r\n\r\nAfter mode styling information is transmitted, no refresh takes place.\r\n\r\n# Expected behaviour:\r\n\r\n1) establish ground rules - color, styles, modes, etc.\r\n2) enter correct state\r\n3) clear the screen\r\n4) send the text updates for areas that are changed _only_.\r\n\r\nShould any text, color, style or mode data changed, \r\n\r\n5) send text updates for areas that are affected _only_.\r\n\r\n# Actual behaviour:\r\n\r\n1) text updates sent before colors are established\r\n2) first line is strangely different from the rest of the screen on startup (bold spaces!  While you think it does not matter, bold styling in a GUI environment may be drastically different visually from non-bold!)\r\n3) monumental changes to colors, styles and mode defaults are not followed by a grid update requiring guesswork or a deep understanding of sequencing of NVIM events (impossible with current quality of documentation, although it specifically says not to expect anything to be in sequence - a nonsensical pronouncement for a protocol that demands sequencing)\r\n4) redundant commands are sent\r\n\r\nAnd finally, forgive me for beating a dead horse, I would like to again point out the not just the initial sequencing is wrong, but pretty much all of messagepack data is so **poorly designed, badly sequenced, inconsistent, and largely undocumented**  that I strongly suspect it was deliberately built as a torture instrument.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/352527062","html_url":"https://github.com/neovim/neovim/issues/7723#issuecomment-352527062","issue_url":"https://api.github.com/repos/neovim/neovim/issues/7723","id":352527062,"user":{"login":"vhakulinen","id":4594126,"avatar_url":"https://avatars3.githubusercontent.com/u/4594126?v=4","gravatar_id":"","url":"https://api.github.com/users/vhakulinen","html_url":"https://github.com/vhakulinen","followers_url":"https://api.github.com/users/vhakulinen/followers","following_url":"https://api.github.com/users/vhakulinen/following{/other_user}","gists_url":"https://api.github.com/users/vhakulinen/gists{/gist_id}","starred_url":"https://api.github.com/users/vhakulinen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vhakulinen/subscriptions","organizations_url":"https://api.github.com/users/vhakulinen/orgs","repos_url":"https://api.github.com/users/vhakulinen/repos","events_url":"https://api.github.com/users/vhakulinen/events{/privacy}","received_events_url":"https://api.github.com/users/vhakulinen/received_events","type":"User","site_admin":false},"created_at":"2017-12-18T19:07:09Z","updated_at":"2017-12-18T19:07:09Z","author_association":"NONE","body":"| ...I can see how it could have been done in a slightly different way that would make GUI client implementations really simple and pretty much stateless.\r\n\r\nI've just finished implementing the `ui-grid` part of own of my UI (using gtk, cairo, pango). Pretty much all the state I need to keep is the cursor, highlight, fg/bg/sp colors, scroll region and the cell metrics of my GUI. Not sure how much more stateless you could go without adding overheat to the protocol - maybe leave all the coloring to the `put` messages, but is there any added benefit? Tho' its probably different thing when you want to use some other than monospaced fonts.\r\n\r\nOne thing I've noticed from other implementations is that all of them (e.g. the ones I've read, atleast partly) keeps state of the grid where they then draw from. I just draw on the `put`, `clear`, `eol_clear`, `scroll` (tho' those handlers just modifies the canvas and queues the draw - actual drawing is done once gtk is ready for it).\r\n\r\nI've yet to dive into the `ui-global` events or the externalized UI options - only done the part `ui-grid` so far. I've also been stalking the UI development for a ~1year or so which might affect the way I see the whole UI API. And yes, the current UI API pretty much assumes that you have a shell/grid where you draw to. Multiple grids PR(s?) looks to change it so that you can have multiple shless/grids - which effectively means that you can have multiple editor windows which you (I assume) can position the way you want to. I might be wrong tho', since I haven't looked too deep into that."}}
{"actor":{"display_login":"vhakulinen"}}