Author Topic: <ENTER> in python after "if" and <END> key doesn't insert newline  (Read 66 times)

rowbearto

  • Senior Community Member
  • Posts: 2206
  • Hero Points: 132
<ENTER> in python after "if" and <END> key doesn't insert newline
« on: September 21, 2022, 05:06:30 pm »
If I type the following in python:

Code: [Select]
if var is None
Then SE is inserting a ':' at the end of the statement, this is expected.

Then I press <END> key to go beyond the ':' and press <ENTER>, but when I press <ENTER> I don't get a newline.

I did not use the down arrow key to indent anything below it.

I think in releases before v27 I think it was inserting a newline.
« Last Edit: September 21, 2022, 05:30:15 pm by rowbearto »

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1742
  • Hero Points: 147
Re: <ENTER> in python after "if" and <END> key doesn't insert newline
« Reply #1 on: September 26, 2022, 01:48:07 pm »
Sorry for the late reply, I had this open in a tab, and apparently buried the tab.

Are you getting a dynamic surround box when this happens?  I see what you're describing, and I'm getting the surround box. 

It looks like to me that the dynamic surround eats the first enter here, but does not in previous versions.  It also does it for Ctrl-Enter (nosplit).  I'll take a look at it.    Only workaround is to turn off dynamic surround for the moment.

rowbearto

  • Senior Community Member
  • Posts: 2206
  • Hero Points: 132
Re: <ENTER> in python after "if" and <END> key doesn't insert newline
« Reply #2 on: September 26, 2022, 01:56:25 pm »
I do get the dynamic surround box. The dynamic surround is desired as I may want to include some below statements in the "if". But I would like <ENTER> to work.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1742
  • Hero Points: 147
Re: <ENTER> in python after "if" and <END> key doesn't insert newline
« Reply #3 on: September 26, 2022, 03:50:23 pm »
Fixed for beta 4.   Thanks for the report.