Author Topic: how to suppress spelling done?  (Read 4351 times)

ehab

  • Senior Community Member
  • Posts: 285
  • Hero Points: 15
  • coding with SE is like playing music
how to suppress spelling done?
« on: October 13, 2009, 10:58:19 AM »
i do a lot of spell word under cursor and a dialog appears " spelling done" it gets very annoying!

how to stop spelling done appearing "suppress done message" from options?

looking at spell.e there is gSuppressDoneMsg ,,, is there a global macro to switch this off?

editing spell.e is the only option but just wanted to know if there is a fancy way in options window.

ehab

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: how to suppress spelling done?
« Reply #1 on: October 13, 2009, 11:45:19 AM »
You could try this.  It vaguely works!

Code: [Select]
_command void myspell() name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_READ_ONLY)
{
   int ecol;
   _str s1 = cur_word(ecol);
   _str s2;
   _str s3;
   if (_spell_check(s3,s2,ecol,s1) != SPELL_NO_MORE_WORDS_RC) {
      spell_check_word();
   }
   else
      message(s1 :+ '  ' :+ 'spelling checked (sort of)');
}

Graeme

ehab

  • Senior Community Member
  • Posts: 285
  • Hero Points: 15
  • coding with SE is like playing music
Re: how to suppress spelling done?
« Reply #2 on: October 13, 2009, 11:53:04 AM »
nice one.

thanks .... never thought this way, why would i edit spell.e and make life comples i dunno ....

i dedicate to you a track

Bruno Sanfilippo & Mathias Grassow - Ambessence Piano and Drones
01 - bruno sanfilippo and mathias grassow - ambessence piano and drones 1.mp3

nice to listen and code

thank you Graeme
ehab

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: how to suppress spelling done?
« Reply #3 on: October 13, 2009, 12:33:12 PM »
Here's a slightly improved version Ehab.  It might not be perfect.

Code: [Select]
_command void myspell() name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_READ_ONLY)
{
   int ecol;
   typeless ddd;
   _save_pos2(ddd);
   next_word();
   prev_word();
   _str s1 = cur_word(ecol);
   _str s2='';
   _str s3='';
   int res = _spell_check(s3,s2,ecol,s1);
   if (res == SPELL_NO_MORE_WORDS_RC || res == SPELL_REPEATED_WORD_RC) {
      message(s1 :+ '  spelling checked');
      _restore_pos2(ddd);
   }
   else
      spell_check_word();
}

I checked out drones2 on youtube but it's not quite my style! : )

Graeme