BUG 2999054: Adding code to prefer Unicode format from clipboard before accepting ANSI text.
git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@64 3f4676ac-adda-40fd-8265-58d1435b1672
This commit is contained in:
parent
364140f03e
commit
72fc0a8052
2 changed files with 21 additions and 13 deletions
|
@ -899,9 +899,15 @@ namespace LSLEditor
|
||||||
|
|
||||||
public new void Paste()
|
public new void Paste()
|
||||||
{
|
{
|
||||||
ResetHighlichting();
|
ResetHighlighting();
|
||||||
|
|
||||||
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text, true))
|
// First try with Unicode
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.UnicodeText, true))
|
||||||
|
{
|
||||||
|
string strTextToPaste = Clipboard.GetDataObject().GetData(DataFormats.UnicodeText, true).ToString().Replace("\r", "");
|
||||||
|
this.ColoredText = strTextToPaste;
|
||||||
|
} // failing that try ANSI text.
|
||||||
|
else if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text, true))
|
||||||
{
|
{
|
||||||
string strTextToPaste = Clipboard.GetDataObject().GetData(DataFormats.Text, true).ToString().Replace("\r", "");
|
string strTextToPaste = Clipboard.GetDataObject().GetData(DataFormats.Text, true).ToString().Replace("\r", "");
|
||||||
this.ColoredText = strTextToPaste;
|
this.ColoredText = strTextToPaste;
|
||||||
|
@ -1147,7 +1153,7 @@ namespace LSLEditor
|
||||||
|
|
||||||
protected override void OnKeyPress(KeyPressEventArgs e)
|
protected override void OnKeyPress(KeyPressEventArgs e)
|
||||||
{
|
{
|
||||||
ResetHighlichting();
|
ResetHighlighting();
|
||||||
|
|
||||||
char keyChar = e.KeyChar;
|
char keyChar = e.KeyChar;
|
||||||
|
|
||||||
|
@ -1743,7 +1749,7 @@ namespace LSLEditor
|
||||||
{
|
{
|
||||||
BeginUpdate();
|
BeginUpdate();
|
||||||
|
|
||||||
ResetHighlichting();
|
ResetHighlighting();
|
||||||
|
|
||||||
string strW = GetNewWhiteSpace(-1);
|
string strW = GetNewWhiteSpace(-1);
|
||||||
int intTabs = (int)(strW.Length / AutoFormatter.GetTab().Length);
|
int intTabs = (int)(strW.Length / AutoFormatter.GetTab().Length);
|
||||||
|
@ -1892,7 +1898,7 @@ namespace LSLEditor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ResetHighlichting()
|
private void ResetHighlighting()
|
||||||
{
|
{
|
||||||
if (HighLightList.Count == 0)
|
if (HighLightList.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -5,25 +5,27 @@
|
||||||
<body style="background-color: white; font-family: Verdana, sans-serif;font-size: 13px;line-height: 1.3">
|
<body style="background-color: white; font-family: Verdana, sans-serif;font-size: 13px;line-height: 1.3">
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<h3><u>2012</u> - Release 2.x.x</h3>
|
<h3><u>2012-01</u> - Release 2.x.x</h3>
|
||||||
* Added
|
- Added
|
||||||
<ul>
|
<ul>
|
||||||
<li>"Release Notes..." to help menu.</li>
|
<li>"Release Notes..." to help menu.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
* Changed
|
- Changed
|
||||||
<ul>
|
<ul>
|
||||||
<li>Updated About.htm</li>
|
<li>Updated About.htm</li>
|
||||||
<li>Tools => Options => Text Editor => General - Changed labels to properly reflect the output file format.</li>
|
<li>Tools => Options => Text Editor => General - Changed labels to properly reflect the output file format.</li>
|
||||||
<li>UTF-8 output no longer prefixes the B.O.M. character.</li>
|
<li>UTF-8 output no longer prefixes the B.O.M. character.</li>
|
||||||
|
<li>UTF-8 is now the default file output format. ANSI is deprecated and will be removed at a later date.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
* Bugs Fixed:
|
- Fixed:
|
||||||
<ul>
|
<ul>
|
||||||
<li>2995296 - Search | Comment Line (Ctl+K) Breaks Line After Search Term</li>
|
<li>SF ID: 2995296 - Search | Comment Line (Ctl+K) Breaks Line After Search Term</li>
|
||||||
<li>3461546 - ReleaseNotes.htm in source, but never used</li>
|
<li>SF ID: 3461546 - ReleaseNotes.htm in source, but never used</li>
|
||||||
<li>3465488 - lslint does not show errors.</li>
|
<li>SF ID: none - Fix for state change without state name passing syntax-check.</li>
|
||||||
<li>no id - Fix for state change without state name passing syntax-check.</li>
|
<li>SF ID: 3465488 - lslint does not show errors.</li>
|
||||||
|
<li>SF ID: 2999054 - Unicode characters do not paste correctly</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue