Commit 8bf55a24 authored by Oleg Korshul's avatar Oleg Korshul

CJK space (12288 code)

parent b7549732
......@@ -220,7 +220,7 @@ var c_oAscDynamicAutoFilter = {
var c_oAscTop10AutoFilter = {
max: 1,
min: 2
}
};
var c_oAscChangeFilterOptions = {
filter: 1,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6790,6 +6790,22 @@ CDocument.prototype.OnKeyDown = function(e)
this.Document_UpdateInterfaceState();
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode == 12288 && false === editor.isViewMode) // Space
{
if (false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content, null, true))
{
this.Create_NewHistoryPoint(AscDFH.historydescription_Document_SpaceButton);
this.DrawingDocument.TargetStart();
this.DrawingDocument.TargetShow();
this.CheckLanguageOnTextAdd = true;
this.Paragraph_Add(new ParaSpace());
this.CheckLanguageOnTextAdd = false;
}
bRetValue = keydownresult_PreventAll;
}
// Если был пересчет, значит были изменения, а вместе с ними пересылается и новая позиция курсора
if (bRetValue & keydownresult_PreventKeyPress && OldRecalcId === this.RecalcId)
......@@ -11086,8 +11102,16 @@ CDocument.prototype.Add_CompositeText = function(nCharCode)
var oRun = this.CompositeInput.Run;
var nPos = this.CompositeInput.Pos + this.CompositeInput.Length;
var oChar = new ParaText();
oChar.Set_CharCode(nCharCode);
var oChar;
if (32 == nCharCode || 12288 == nCharCode)
{
oChar = new ParaSpace();
}
else
{
oChar = new ParaText();
oChar.Set_CharCode(nCharCode);
}
oRun.Add_ToContent(nPos, oChar, true);
this.CompositeInput.Length++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment