About Line Feed Code
Line feed code that can be handled
The file where two or more line feed codes exist together can be handled.
- CR00LF00 ( 0d 00 0a 00 ) Abolition. (sakura:1.3.4.1)
- CRLF ( 0d 0a )
- LFCR ( 0a 0d )
- CR ( 0d )
- LF ( 0a )
Processing when file is read
When the file is read, it adds it to the line buffer each line feed unit.
- It loops until it searches for one byte from the head of the file, and CR or LF appears.
- To which of the line feed code that can be handled it corresponds is examined.
- Information on the line text and the line feed code is stored in the line buffer.
- It repeats to the end of the file.
- Information without the line text and the line feed code is stored in the line buffer when there is a line without line-feed at the end of the file.
- The kind of the line feed code is distinguished. As a result, the line feed code inserted with Enter etc. when editing it is decided.
When two or more line feed codes are detected, the user selects the line feed code inserted with Enter etc. when editing it from one list.
It is not possible to select it now (Because the changed interface is not prepared though "Line feed code that should be inserted" is internally maintained as data)."When the file is opened, becomes line feed code used for the end of the first line" in default.- After the file had been opened, the changed command was added.
Processing when display layout information is made
The method of describing the width of TAB, the comment sign, and the character string and display layout information is made from the line buffer by return based on the digit number etc. (layout buffer)
Processing copied to clipboard
When rectangle is selected
- The data of "MSDEVColumnSelect" form is stored in the clipboard.
- The data content is irregular.
- The data of the CF_OEMTEXT form is stored in the clipboard.
- It converts into CRLF when each line of the preference field contains line-feed, and when it doesn't contain changing line, CRLF is added.
- All line feed codes are united to CRLF.
- It omits it since null character (0x00).
- The data of "SAKURAClip" form is stored in the clipboard.
- Four bytes of head 0-3 are the data lengths(n) of the int type.
- Head 4 - 4+n-1 of n bytes is data. (The binary is contained)
- When it doesn't contain line-feed as it is when each line of the preference field contains changing line, CRLF is added.
At linear selection
- The data of the CF_OEMTEXT form is stored in the clipboard.
- The line feed code maintains the state of a former text.
- It omits it since null character (0x00).
- The data of "SAKURAClip" form is stored in the clipboard.
- Four bytes of head 0-3 are the data lengths(n) of the int type.
- Head 4 - 4+n-1 of n bytes is data. (The binary is contained)
Put processing from clipboard
The form of the clipboard is examined.
- When there is "MSDEVColumnSelect" form
- It is assumed a rectangular putting.
- When there is "SAKURAClip" form
- The data is taken out and it is assumed the putting data as it is.
- When there is data of the CF_UNICODETEXT form
- What converted into ShiftJIS by using the SJIS in Sakura-Editor conversion logic is assumed to be putting data.
- The line feed code maintains the state of a former text.
- It omits it since null character (0x00).
- When there is data of the CF_OEMTEXT form
- The data is taken out and it is assumed the putting data as it is.
- The line feed code maintains the state of a former text.
- It omits it since null character (0x00).
Processing when [Enter] key is input
When the file is read, the kind of the inserted line feed code is decided.
When the [Enter] key is input, it converts into the line feed code and it stores it.
Line feed code storage form to undo/redo buffer
The former version expressed the line feed code with \r.
The upgrade product stores CRLF and LFCR, etc. as it is.
The two or more kind of line feed code is distinguished at the taking out processing from the buffer.
About the symbol table record by the edit display
Please note that the mark of the line feed code changed from 1.6.0.0.
- 1.5.17.0 or before : LF<Left Arrow>,CR<Down Arrow>
- 1.6.0.0 or later : LF<Down Arrow>,CR<Left Arrow>
The version before must not mistake, and understand as the specification change this because the one by past details.