patch to fix "Title Case" operation


Subject: patch to fix "Title Case" operation
From: Will Robinson (wsr23@stanford.edu)
Date: Wed Apr 04 2001 - 01:50:09 CDT


I noticed that title case option in the change case dialog wasn't
capitalizing the first word in your selection unless you also highlighted
the space before the word.

This patch seems to fix that. But there's a possible problem: To fix the
bug, I needed a way of getting the character in front of the head of the
selected region. I expected to find a straightforward function somewhere
that took in a PT_DocPosition and returned the character at that position,
but I couldn't find it. So in my patch I get the character by getting the
block that contains that position, reading the block into a buffer, etc.
etc. If there is a nice little utility function somewhere that returns
the character at a PT_DocPosition, then this patch has a lot of redundant
code. :)

Anyway, hope it helps kill this small bug,
Will Robinson

"I fed him a strict diet of gasoline and iron filings! He's as strong as
an ox and five times smarter!!!!!"
                                       --Pokey the Penguin




This archive was generated by hypermail 2b25 : Wed Apr 04 2001 - 01:50:19 CDT