I was just looking after the same problem.
Thanks for the fix. I've just submitted it.
Massimiliano
ps: if your editor reformat the sources then patches are unusable. you have to
disable reformatting when working on texmacs code.
On 5 nov. 2010, at 23:22, Miguel de Benito Delgado wrote:
> HI all,
>
> I've been experiencing a bug with the svn version of the code for some
> time. Pressing the "apostrophe" key ( ´ ), the one needed to produce letters
> like á é í ó ú, caused the program to crash apparently after a random number
> of times. The console showed pairs of
>
> -[NSCFString characterAtIndex:]: Range or index out of bounds
>
> and a, to my eyes, utterly undecipherable stack trace. It took me an
> embarrassing amount of time to think of searching for "characterAtIndex" and
> thus locate the problem in Plugins/MacOS/mac_utilities.mm, function
> mac_handler_body, around line 76. The new first few lines of it must check
> for empty strings:
>
>
> NSEvent *mac_handler_body(NSEvent *event)
> {
> if (([event type] == NSKeyDown) || ([event type] == NSKeyUp)) {
> NSString *nss = [event charactersIgnoringModifiers];
> if ([nss length] > 0) {
> unichar key = [nss characterAtIndex:0];
>
> and then a new closing brace must be added, of course. I have attached a diff
> for that file only, but my editor has messed up the indentation so it looks
> bigger than it is.
>
> Best regards,
> ________________
> Miguel de Benito.
> <diff-against-3522.zip>_______________________________________________
> Texmacs-dev mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/texmacs-dev
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev