You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/02/19 12:39:37 UTC

[GitHub] [incubator-nuttx-apps] gustavonihei opened a new pull request #599: Fix CLE initial cursor position

gustavonihei opened a new pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599


   ## Summary
   As noted by @v01d in [incubator-nuttx#2838](https://github.com/apache/incubator-nuttx/pull/2838#issuecomment-778363299), there was a missing whitespace after the NSH prompt.
   It seems it was due to a bug in the CLE application, which was miscalculating the initial cursor position. At first, after printing the "nsh> " prompt the Host correctly reports the initial cursor position as `ESC ] 39 ; 6 R`, which means **row:39** and **column:6**.
   
   But, next the CLE app calculates an offset of 5 (column - 1) for the initial cursor position. But, this offset is sent to the Host later as if the first column was 0.
   
   ```
   NuttShell (NSH) NuttX-10.0.1
   nsh> Returning: .[1b]
   Returning: [[5b]
   Returning: 3[33]
   Returning: 9[39]
   Returning: ;[3b]
   Returning: 6[36]
   Returning: R[52]
   row=39 column=6
   row=39 column=6
   row=39 column=0 offset=5
   row=39 column=0 offset=5
   ```
   According to the [VT100 documentation](https://vt100.net/docs/vt100-ug/chapter3.html), the column for the initial cursor position is 1:
   
   ![image](https://user-images.githubusercontent.com/38959758/108504250-5616e780-7294-11eb-8487-f6e9e0925de6.png)
   
   ## Impact
   
   
   ## Testing
   Tested on:
   - esp32c3:nsh
   - esp32:nsh
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] gustavonihei commented on pull request #599: Fix CLE initial cursor position

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599#issuecomment-782074581


   > I don't remember seeing this issue in other archs (but maybe I'm wrong). Do you think this bug could depend on arch somehow? Maybe it would be good to verify that other arch still works as expected.
   
   I've tried to test it on sim:nsh, but I had some trouble building the simulator on OSX.
   Unfortunately I don't have any other boards here with me at the moment =/


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] v01d commented on pull request #599: Fix CLE initial cursor position

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599#issuecomment-782075830


   I can test in a few hours, if anyone else does not test it sooner.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] v01d removed a comment on pull request #599: Fix CLE initial cursor position

Posted by GitBox <gi...@apache.org>.
v01d removed a comment on pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599#issuecomment-782075357


   I don't remember seeing this issue in other archs (but maybe I'm wrong). Do you think this bug could depend on arch somehow? Maybe it would be good to verify that other arch still works as expected.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] gustavonihei edited a comment on pull request #599: Fix CLE initial cursor position

Posted by GitBox <gi...@apache.org>.
gustavonihei edited a comment on pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599#issuecomment-782074581


   > I don't remember seeing this issue in other archs (but maybe I'm wrong). Do you think this bug could depend on arch somehow? Maybe it would be good to verify that other arch still works as expected.
   
   I've tried to test it on sim:nsh, but I had some trouble building the simulator on OSX.
   Unfortunately I don't have any other boards here with me at the moment 😞 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] v01d commented on pull request #599: Fix CLE initial cursor position

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599#issuecomment-782075357


   I don't remember seeing this issue in other archs (but maybe I'm wrong). Do you think this bug could depend on arch somehow? Maybe it would be good to verify that other arch still works as expected.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] v01d commented on pull request #599: Fix CLE initial cursor position

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599#issuecomment-782073014


   I don't remember seeing this issue in other archs (but maybe I'm wrong). Do you think this bug could depend on arch somehow? Maybe it would be good to verify that other arch still works as expected.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #599: Fix CLE initial cursor position

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] v01d commented on pull request #599: Fix CLE initial cursor position

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #599:
URL: https://github.com/apache/incubator-nuttx-apps/pull/599#issuecomment-782208874


   I realize now that there aren't that many configs with SYSTEM_CLE, which would explain why it was only present in this case. In fact I remember seeing this issue when enabling CLE on some board.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org