Author Topic: Interesting "paste" feature or ??  (Read 233 times)

Offline RickF

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Interesting "paste" feature or ??
« on: August 31, 2011, 12:41:35 am »
Alex.. Got another one for ya if you don't mind..

In a C++ buffer, if I paste the following comment line -- make sure it does NOT include a carriage return at the end (so you can continue adding to the same line)..

Code: [Select]
////////////////////// BEGIN FOO ADD ////////////////////////////
then press "return" afterwards, it copies a bunch of "///////////////////////" on the line instead of inserting a carriage return.. So I get a single line like the following :

Code: [Select]
////////////////////// BEGIN FOO ADD /////////////////////////////////////////////////////////////////////////////////////////////////

If I continue to press return the line just gets longer and longer.. Is this the desired behavior or ??

Please advise.. Obviously this is not killing me but just an interesting observation..

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Interesting "paste" feature or ??
« Reply #1 on: August 31, 2011, 01:50:13 am »
Hi Rick,

the reason for such behavior standard code template for C++ with key "///" which expands to long "////.....". I am sure, when you pasted comments, you have seen tooltip proposing this template, and with pressing Enter you have accepted it, and editor has inserted it. Engine checks text from current position back, after altering text, and if text ending matches to any template key suggest it.

Generally this is often problem with templates, if you typed something in the end of line. I have not found elegant solution for solving of this, but there are tow workarounds: one is to remove Enter from tool tip accept keys and another one is just dismiss code hint suggestion with Esc or by waiting for a some time.

BR, Alex.

Offline RickF

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Interesting "paste" feature or ??
« Reply #2 on: August 31, 2011, 04:44:31 am »
Thanks.. Good to know..  ;)

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
751 Views
Last post February 15, 2009, 04:28:32 pm
by alex
3 Replies
664 Views
Last post March 01, 2009, 01:05:35 am
by alex
0 Replies
597 Views
Last post March 07, 2009, 08:51:51 pm
by Stefan
6 Replies
1022 Views
Last post November 02, 2009, 11:12:18 pm
by alex
6 Replies
347 Views
Last post August 24, 2011, 05:08:07 pm
by false007